colander_data_converter.base.types.device
- class colander_data_converter.base.types.device.DeviceType[source]
Bases:
CommonEntityType
DeviceType represents metadata for devices in Colander. Check the list of supported types.
Example
>>> device_type = DeviceTypes.MOBILE.value >>> print(device_type.name) Mobile device
- Fields:
- Validators:
is_supported_type
»short_name
- class colander_data_converter.base.types.device.DeviceTypes(*values)[source]
Bases:
Enum
DeviceTypes provides access to all supported device types.
This class loads device type definitions from the device types JSON file and exposes them as an enum. It also provides a method to look up a device type by its short name.
Example
>>> device_type = DeviceTypes.LAPTOP.value >>> print(device_type.name) Laptop >>> default_type = DeviceTypes.by_short_name("nonexistent") >>> print(default_type.name) Generic
- DESKTOP = DESKTOP
Desktop - A personal computer intended for regular use at a single location.
- GENERIC = GENERIC
Generic - A general or unspecified device type that does not fit other categories.
- IOT = IOT
Internet of Things - A device connected to the internet, often embedded and used for specific functions (e.g., smart home devices).
- LAPTOP = LAPTOP
Laptop - A portable personal computer designed for mobile use.
- MOBILE = MOBILE
Mobile device - A handheld device such as a smartphone or tablet.
- ROUTER = ROUTER
Router - A network device that forwards data packets between computer networks.
- SERVER = SERVER
Server - A computer or system that provides resources, data, or services to other computers over a network.
- default = GENERIC