opensampl.vendors.constants
Defines constants for use in probe functions
ProbeKey
Bases: BaseModel
Model for Probe identity, which is both probe_id and ip_address
Source code in opensampl/vendors/constants.py
6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
__repr__()
Represent Probe key as [ip_address]_[probe_id]
Source code in opensampl/vendors/constants.py
12 13 14 |
|
__str__()
Get Probe key string as [ip_address]_[probe_id]
Source code in opensampl/vendors/constants.py
16 17 18 |
|
VENDORS
Vendors available for use
Source code in opensampl/vendors/constants.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
all()
classmethod
Get all vendors
Source code in opensampl/vendors/constants.py
77 78 79 80 |
|
get_by_name(name, case_sensitive=False)
classmethod
Get a vendor type by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the vendor to get |
required |
case_sensitive
|
bool
|
Whether to match the name case-sensitively (default: False) |
False
|
Returns:
Name | Type | Description |
---|---|---|
VendorType |
VendorType
|
The vendor type definition |
Source code in opensampl/vendors/constants.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
VendorType
Bases: BaseModel
Model for Vendor Type Definition
Source code in opensampl/vendors/constants.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
get_orm()
Get the Sqlalchemy ORM object associated with the vendor type
Source code in opensampl/vendors/constants.py
39 40 41 42 |
|
get_parser()
Get the Python Class object associated with the vendor type
Source code in opensampl/vendors/constants.py
30 31 32 33 34 35 36 37 |
|