Skip to main content

SDK for Memair

Project description

https://badge.fury.io/py/memair.svg http://img.shields.io/badge/license-MIT-yellow.svg?style=flat https://img.shields.io/badge/contact-Gregology-blue.svg?style=flat

Overview

SDK for simple interaction with the Memair APIs

Interactive Notebook

Explore this package in an Interactive Notebook

https://user-images.githubusercontent.com/1595448/47387817-6b88a080-d6de-11e8-822d-ddd4f83fbd9b.png

Hosted by binder

Installation

memair is available on PyPI

http://pypi.python.org/pypi/memair

Install via pip

$ pip install memair

Or via easy_install

$ easy_install memair

Or directly from memair’s git repo

$ git clone git://github.com/memair/memair-python-sdk.git
$ cd memair
$ python setup.py install

Basic usage

Generate a temporary access token

Validate GraphQL with GraphiQL

>>> from memair import Memair
>>> api_key = '0000000000000000000000000000000000000000000000000000000000000000'
>>> user = Memair(api_key)
>>> latest_location = user.query('''
        {
            Locations(first: 1, order: timestamp_desc) {
            lat
            lon
            timestamp
          }
        }
    ''')
>>> latest_location['data']['Locations'][0]
{'lat': 42.909056, 'lon': -74.572508, 'timestamp': '2018-07-27T22:27:21Z'}

Running Test

$ python tests.py

Python compatibility

Developed for Python 3. May work but not tested in Python 2.

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
memair-0.1.2.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page