An Apache2 Licensed, unofficial Python client for the MyGeotab SDK.
Also bundled is the “myg” command line tool, which is a sandboxed console for quickly querying and operating on
- Automatic serializing and de-serializing of JSON results
- Clean, Pythonic API for querying data
- Cross-platform and compatible with Python 2.7.9+, 3.4+, and pypy 4+
>>> import mygeotab
>>> api = mygeotab.API(firstname.lastname@example.org', password='mypass', database='DemoDB')
>>> api.get('Device', name='%Test Dev%')
'name': 'Test Device',
To install the MyGeotab library and command line tool:
$ pip install mygeotab
or for the bleeding-edge version:
$ pip install git+https://github.com/geotab/mygeotab-python
- Ensure all dates are timezone aware and are always UTC-localized.
- Fixed intermittent timeout errors due to upstream changes in the ‘requests’ module
- Switched back to using abstract dependencies in setup.py (recommended by this guide)
- Fix for search parameter not being properly handled in ‘get()’ call
- Deprecated the ‘search()’ and ‘search_async()’ functions. Replaced by folding the previous functionality into ‘run()’.
- Removed ‘tzlocal’ dependency. Always deal with dates in UTC by default.
- Prefer functions instead of making static methods in classes.
- Added helper to run async calls and collect their results
- Add ability to quickly run simple python scripts from the ‘myg’ console with no need for any authentication handling. Similar to ‘console’, but for running scripts rather than creating an interactive console.
- Added the ability to make unauthenticated calls (like “GetVersion”) with the static “API.server_call” method
- Added asyncio-based API query methods (Python 3.5+ only) into the “ext” package
- Moved the datafeed to the “ext” package, as well
- MyGeotab never returns 3 digits of milliseconds, so follow that format as well to allow the use of “dates.format_iso_datetime” to create MyGeotab URLs
- Use a custom User-Agent when making requests
- Extension for facilitating use of the MyGeotab Data Feed
- Allow Pythonic underscore-separated parameters mapped to camelcase ones
- Force the use of TLS 1.2 for upcoming strict security requirements in MyGeotab
(Note that TLS 1.2 is only supported in Python 2.7.9+ and 3.4+)
- Fixed issue with CLI console startup
- Use the system’s default user location for config files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.