Python interface to interact with Traccar REST API.
Tested with Python 2.7, Python 3.4, Python 3.5, Python 3.6 and Python 3.7
Installation from source (requires git):
$ git clone https://github.com/Legacier/pytraccar.git
$ cd pytraccar
$ python setup.py install
For more info, please refer to the Traccar API Reference.
For testing purpouses, check these variables in file test_api_calls.py and set them with your traccar server values.
Your Traccar's server URL (default: localhost)
test_url = 'http://127.0.0.1:8082'
Email and password from a standard user or admin. (default: admin)
username, correct_password = 'admin', 'admin'
Standard user token. Required for all tests with limited user permissions.
user_token = 'YOUR_TOKEN_HERE'
Admin user token. Required for all tests with admin permissions
admin_token = 'YOUR_TOKEN_HERE'
Then, run pytest to start testing.
$ python -m pytest
Tested
- /session
- /users
- /devices
- /notifications
- /geofences
- Fork it (https://github.com/Silverdoses/pytraccar/fork)
- Create your feature branch (
git checkout -b feature/yourbranch
) - Commit your changes (
git commit -am 'info here'
) - Push to the branch (
git push origin feature/yourbranch
) - Create a new Pull Request
PyTraccar is built on top of code developed from/by:
- Anton Tananaev, https://github.com/tananaev
- Traccar, https://github.com/traccar/traccar