Skip to main content

SDK for the find me spot

Project description

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

Overview

Simple SDK for extracting messages from Spot’s API

Installation

spot-sdk is available on PyPI

http://pypi.python.org/pypi/spot-sdk

Install via pip

$ pip install spot-sdk

Or via easy_install

$ easy_install spot-sdk

Or directly from spot-sdk’s git repo <https://github.com/gregology/spot-sdk>

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

Basic usage

>>> from spot_sdk import Feed
>>> api_key = 'abcdefghijklmnopqrstuvwxy01234567'
>>> feed = Feed(api_key)
>>> feed.collect()
>>> feed.count()
6
>>> foo.messages
[<spot_sdk.Message object at 0x10fd7f630>, <spot_sdk.Message object at 0x10fd7f6a0>...
>>> feed.first().type
'UNLIMITED-TRACK'
>>> feed.last().battery_state
'GOOD'
>>> feed.messages[0].latitude
42.000
>>> feed.last().datetime
datetime(2017, 1, 1, 0, 42, 0)

Running Test

$ python spot_sdk/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
spot-sdk-2018.2.22.1.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None Feb 22, 2018

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 DigiCert DigiCert EV certificate StatusPage StatusPage Status page