51Degrees Pipeline for Python

fiftyone_pipeline_cloudrequestengine.constants.Constants Class Reference

Static Public Attributes

str FOD_CLOUD_API_URL = "FOD_CLOUD_API_URL"
str BASE_URL_DEFAULT = "https://cloud.51degrees.com/api/v4/"
str MESSAGE_NO_DATA_IN_RESPONSE = "No data in response from cloud service at {}"
str EXCEPTION_CLOUD_ERRORS_MULTIPLE
str EXCEPTION_CLOUD_ERROR
str EVIDENCE_SEPERATOR = "."
str EVIDENCE_HTTPHEADER_PREFIX = "header"
str EVIDENCE_COOKIE_PREFIX = "cookie"
str EVIDENCE_QUERY_PREFIX = "query"
str EVIDENCE_OTHER = "other"
str WARNING_MESSAGE = "WARNING: '{}:{}' evidence conflicts with "
str MESSAGE_ERROR_CODE_RETURNED = "Cloud service at '{}' returned status code '{}' with content {}"
str RESOURCE_PARAMETER = "resource"
str LICENSE_PARAMETER = "license"
str VALUES_PARAMETER = "values"
tuple RESERVED_EVIDENCE_SUFFIXES
str LICENSE_DATA_PATH = "json"
tuple WARNING_RESERVED_EVIDENCE
tuple MESSAGE_NO_CREDENTIAL
tuple MESSAGE_LICENSE_KEY_NEEDS_PROPERTIES
tuple MESSAGE_PROPERTIES_IGNORED_WITH_RESOURCE_KEY
tuple MESSAGE_PROPERTIES_NOT_COVERED

Member Data Documentation

◆ BASE_URL_DEFAULT

str fiftyone_pipeline_cloudrequestengine.constants.Constants.BASE_URL_DEFAULT = "https://cloud.51degrees.com/api/v4/"
static

◆ EVIDENCE_COOKIE_PREFIX

str fiftyone_pipeline_cloudrequestengine.constants.Constants.EVIDENCE_COOKIE_PREFIX = "cookie"
static

◆ EVIDENCE_HTTPHEADER_PREFIX

str fiftyone_pipeline_cloudrequestengine.constants.Constants.EVIDENCE_HTTPHEADER_PREFIX = "header"
static

◆ EVIDENCE_OTHER

str fiftyone_pipeline_cloudrequestengine.constants.Constants.EVIDENCE_OTHER = "other"
static

◆ EVIDENCE_QUERY_PREFIX

str fiftyone_pipeline_cloudrequestengine.constants.Constants.EVIDENCE_QUERY_PREFIX = "query"
static

◆ EVIDENCE_SEPERATOR

str fiftyone_pipeline_cloudrequestengine.constants.Constants.EVIDENCE_SEPERATOR = "."
static

◆ EXCEPTION_CLOUD_ERROR

str fiftyone_pipeline_cloudrequestengine.constants.Constants.EXCEPTION_CLOUD_ERROR
static
Initial value:
= \
"Error returned from 51Degrees cloud service: '{}'"

◆ EXCEPTION_CLOUD_ERRORS_MULTIPLE

str fiftyone_pipeline_cloudrequestengine.constants.Constants.EXCEPTION_CLOUD_ERRORS_MULTIPLE
static
Initial value:
= \
"Multiple errors returned from 51Degrees cloud service. See inner " + \
"exceptions for details."

◆ FOD_CLOUD_API_URL

str fiftyone_pipeline_cloudrequestengine.constants.Constants.FOD_CLOUD_API_URL = "FOD_CLOUD_API_URL"
static

◆ LICENSE_DATA_PATH

str fiftyone_pipeline_cloudrequestengine.constants.Constants.LICENSE_DATA_PATH = "json"
static

◆ LICENSE_PARAMETER

str fiftyone_pipeline_cloudrequestengine.constants.Constants.LICENSE_PARAMETER = "license"
static

◆ MESSAGE_ERROR_CODE_RETURNED

str fiftyone_pipeline_cloudrequestengine.constants.Constants.MESSAGE_ERROR_CODE_RETURNED = "Cloud service at '{}' returned status code '{}' with content {}"
static

◆ MESSAGE_LICENSE_KEY_NEEDS_PROPERTIES

tuple fiftyone_pipeline_cloudrequestengine.constants.Constants.MESSAGE_LICENSE_KEY_NEEDS_PROPERTIES
static
Initial value:
= (
"CloudRequestEngine has a licence key and no requested_properties. "
"A licence key names no properties of its own, so the cloud service "
"answers 400 to every request made with one that does not list the "
"properties it wants. Set requested_properties to the fully "
"qualified names wanted, for example "
"['device.ismobile', 'device.iscrawler'].")

◆ MESSAGE_NO_CREDENTIAL

tuple fiftyone_pipeline_cloudrequestengine.constants.Constants.MESSAGE_NO_CREDENTIAL
static
Initial value:
= (
"CloudRequestEngine needs a resource key or a licence key to "
"authenticate with, as the cloud service answers 401 to a request "
"that carries neither. Create a resource key for free at "
"https://configure.51degrees.com?utm_source=code&utm_medium=comment&utm_campaign=51degrees-python&utm_content=fiftyone_pipeline_cloudrequestengine-src-fiftyone_pipeline_cloudrequestengine-constants.py&utm_term=no-credential")

◆ MESSAGE_NO_DATA_IN_RESPONSE

str fiftyone_pipeline_cloudrequestengine.constants.Constants.MESSAGE_NO_DATA_IN_RESPONSE = "No data in response from cloud service at {}"
static

◆ MESSAGE_PROPERTIES_IGNORED_WITH_RESOURCE_KEY

tuple fiftyone_pipeline_cloudrequestengine.constants.Constants.MESSAGE_PROPERTIES_IGNORED_WITH_RESOURCE_KEY
static
Initial value:
= (
"CloudRequestEngine has requested_properties and a resource key. "
"The cloud service ignores the list whenever a resource key is "
"present and answers with everything the resource key carries, so "
"the caller would believe the response had narrowed when it had "
"not. Either leave out requested_properties, or authenticate with "
"a licence key alone.")

◆ MESSAGE_PROPERTIES_NOT_COVERED

tuple fiftyone_pipeline_cloudrequestengine.constants.Constants.MESSAGE_PROPERTIES_NOT_COVERED
static
Initial value:
= (
"The cloud service did not return the requested properties {} in "
"its answer. They are not covered by the licence key in use, so "
"they will be missing from every result. The other requested "
"properties came back and are usable.")

◆ RESERVED_EVIDENCE_SUFFIXES

tuple fiftyone_pipeline_cloudrequestengine.constants.Constants.RESERVED_EVIDENCE_SUFFIXES
static
Initial value:
= (
RESOURCE_PARAMETER, LICENSE_PARAMETER, VALUES_PARAMETER)

◆ RESOURCE_PARAMETER

str fiftyone_pipeline_cloudrequestengine.constants.Constants.RESOURCE_PARAMETER = "resource"
static

◆ VALUES_PARAMETER

str fiftyone_pipeline_cloudrequestengine.constants.Constants.VALUES_PARAMETER = "values"
static

◆ WARNING_MESSAGE

str fiftyone_pipeline_cloudrequestengine.constants.Constants.WARNING_MESSAGE = "WARNING: '{}:{}' evidence conflicts with "
static

◆ WARNING_RESERVED_EVIDENCE

tuple fiftyone_pipeline_cloudrequestengine.constants.Constants.WARNING_RESERVED_EVIDENCE
static
Initial value:
= (
"WARNING: '{}' evidence is not sent to the cloud service, because "
"the service reads its credentials and the list of requested "
"properties from that name. The engine's own settings are sent "
"instead.")