Device Detection services for 51Degrees Pipeline

fiftyone_devicedetection_examples.onpremise.shareusage Namespace Reference

Classes

class  ShareUsageExample

Functions

 generate_random_ip ()
 Generate a random IP address for demonstration purposes.
 filter_evidence (evidence, prefix)
 Filter evidence entries to only include those with the specified prefix.
 main (argv)

Variables

 _original_post = requests.post
 post
int REQUESTED_PACKAGE_SIZE = 10
int SHARE_PERCENTAGE = 1
int RECORDS_TO_PROCESS = 100
str EVIDENCE_CLIENTIP_KEY = "server.client-ip"
str EVIDENCE_USAGE_FROM_KEY = "header.usage-from"
str USAGE_FROM_VALUE = "YourCompanyName"

Function Documentation

◆ filter_evidence()

filter_evidence ( evidence,
prefix )

Filter evidence entries to only include those with the specified prefix.

◆ generate_random_ip()

generate_random_ip ( )

Generate a random IP address for demonstration purposes.

In a real application, this would come from the HTTP request.

◆ main()

main ( argv)

Variable Documentation

◆ _original_post

fiftyone_devicedetection_examples.onpremise.shareusage._original_post = requests.post
protected

◆ EVIDENCE_CLIENTIP_KEY

str fiftyone_devicedetection_examples.onpremise.shareusage.EVIDENCE_CLIENTIP_KEY = "server.client-ip"

◆ EVIDENCE_USAGE_FROM_KEY

str fiftyone_devicedetection_examples.onpremise.shareusage.EVIDENCE_USAGE_FROM_KEY = "header.usage-from"

◆ post

fiftyone_devicedetection_examples.onpremise.shareusage.post

◆ RECORDS_TO_PROCESS

int fiftyone_devicedetection_examples.onpremise.shareusage.RECORDS_TO_PROCESS = 100

◆ REQUESTED_PACKAGE_SIZE

int fiftyone_devicedetection_examples.onpremise.shareusage.REQUESTED_PACKAGE_SIZE = 10

◆ SHARE_PERCENTAGE

int fiftyone_devicedetection_examples.onpremise.shareusage.SHARE_PERCENTAGE = 1

◆ USAGE_FROM_VALUE

str fiftyone_devicedetection_examples.onpremise.shareusage.USAGE_FROM_VALUE = "YourCompanyName"