You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

digitrecklib

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digitrecklib

digitrecklib library provide easy and convenient way to connect to digitreck servers for efficient device location based services.It enables using digiTreck APIs as methods alongwith header and checksum management.

0.2.1
pipPyPI
Maintainers
1

digitreck-python

digitreck-python library enables Python applications to connect to digiTreck servers in a fast and convenient way. It enables using digiTreck APIs as methods alongwith header and checksum management.

1. Adding Dependency

Easiest way to integrate digitreck library to your app is through pip

pip install digitrecklib

2. Initialize the Library

To initialize the library, get Project API Key and Private key from the dashboard.

config = {
  Config.SERVER_KEY: REPLACE_WITH_API_KEY_FROM_PROJECT, 
  Config.PRIVATE_KEY: REPLACE_WITH_SECRET_SALT_FROM_PROJECT
}
requester = Digitreck(config).getInstance()

3. Next Steps

Congratulations! You have successfully performed the basic integration. Now lets move to performing functions like location management and session management.

  • Location Management

1. Device Location

device_id = DEVICE_ID

result = helper.getLocation(device_id)

2. Device Path

device_id = NAUTILUS_DEVICE_ID_1
start_date = "2017-02-20T19:34:01.326Z"
end_date = "2017-02-20T19:34:01.326Z"

result = helper.getPath(device_id, start_date, end_date)

3. Nearby Device

count = RESULT_COUNT
access_key = ACCESS_KEY
lat = LATITUDE
lng = LONGITUDE
range = RADIUS

result = helper.getNearbyDevice(count, access_key, lat, lng, range)
  • Session Management

1. Creating a Tracking session

device_list = [
  DEVICE_ID_1, 
  DEVICE_ID_2
]

result = requester.createSessions(device_list)

2. Releasing a Tracking session

tracking_id = TRACKING_SESSION_ID

result = helper.releaseSession(tracking_id)

Keywords

framework

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts