Coder Social home page Coder Social logo

pooriapoorsarvi / mygeotab-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geotab/mygeotab-python

0.0 0.0 0.0 717 KB

A Python client for the MyGeotab API.

Home Page: https://mygeotab-python.readthedocs.io

License: Apache License 2.0

Python 100.00%

mygeotab-python's Introduction

MyGeotab

Build Status Documentation Status 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.7+
  • 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='[email protected]', 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='[email protected]', 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

mygeotab-python's People

Contributors

aaront avatar pyup-bot avatar matthewscanlan-geotab avatar aaront-geotab avatar dependabot[bot] avatar softyy avatar eyazrgeotab avatar mcallaghan-bsm avatar pieter-venter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.