Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Geotab/mygeotab-python

Repository files navigation

MyGeotab

Build Status Documentation Code Coverage PyPI Version Python Versions License

A Python client for the MyGeotab SDK.

Features

  • Automatic serializing and deserializing of API call results
  • Clean, Pythonic API for querying data
  • Cross-platform and compatible with Python 3.9+
  • A myg command-line tool for interactively working with data in a terminal

Usage

It's very easy to get started once you've registered a MyGeotab database:

import mygeotab
client = mygeotab.API(username='hello@example.com', password='mypass', database='MyDatabase')
client.authenticate()
devices = client.get('Device', name='%Test Dev%')
print(devices)
# [{'maxSecondsBetweenLogs': 200.0,
# 'activeTo': '2050-01-01',
# 'minAccidentSpeed': 3.0,
# 'ignoreDownloadsUntil': '1986-01-01',
# 'name': 'Test Device',
# 'idleMinutes': 3.0,
# ......

You can also make calls asynchronously via asyncio:

import asyncio
import mygeotab
client = mygeotab.API(username='hello@example.com', password='mypass', database='MyDatabase')
client.authenticate()
async def get_device():
 return await client.get_async('Device', name='%Test Dev%')
devices = loop.run_until_complete(get_device())
print(devices)
# [{'maxSecondsBetweenLogs': 200.0,
# 'activeTo': '2050-01-01',
# 'minAccidentSpeed': 3.0,
# 'ignoreDownloadsUntil': '1986-01-01',
# 'name': 'Test Device',
# 'idleMinutes': 3.0,
# ......

Installation

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

Documentation

Read the docs at http://mygeotab-python.readthedocs.org

About

A Python client for the MyGeotab API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 11

Languages

AltStyle によって変換されたページ (->オリジナル) /