Skip to main content

This library used for populating data for traccar server in order to speedup development process or troubleshooting a traccar server

Project description

Generating real data for development is troublesome, thats why better to create data populator for that purpose, this library. This library help us to populate data for device trip.

How to Use

Installation

Installation

pip install TraccarDataPopulator

Usage

To use this library you just need to provide traccar url for osmand and device_id

from TraccarDataPopulator.Populator import Populator
populator = Populator('http://demo.traccar.org:5055','testid2',5)
populator.populateData([[-8.2257,113.2190],[-8.2258,113.2190],[-8.1260,113.2190,10]])
populator.populateDataBetweenTwoLocationFollowingRoad(112.78532737805308,-7.38007105,105.4596077,-7.0249592)

Available Function

Populator(traccar_url,device_id,speed)

This function instantiate populator for specific traccar url, device id, and speed
#### setSpeed(speed)
This function set speed that sent to traccar server
#### setDeviceId(device_id)
This function set device_id that sent to traccar server
#### populateData([[lat,lon],[lat,lon,speed]])
This function send data to traccar by given input format lat,lon with speed as mentioned in setSpeed. Other format is lat,lon,speed which send data with custom speed
#### populateDataBetweenTwoLocationFollowingRoad(origin_lon,origin_lat,destination_lon,destination_lat) This function send data to traccar by following routes
#### populateDataFromFile(filepath)
This function send data to traccar by given flat file with each input perline.
-8.1257,113.2190
-8.1260,113.2190,10

Contact:

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TraccarDataPopulator-0.2.tar.gz (2.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page