An open API service indexing awesome lists of open source software.

https://github.com/pschmitt/sherlockbikepy

Python library to interact with the sherlock.bike API
https://github.com/pschmitt/sherlockbikepy

api bike gps iot python sherlock-bike

Last synced: about 1 month ago
JSON representation

Python library to interact with the sherlock.bike API

Awesome Lists containing this project

README

          

# sherlockbikepy

This Python library implements the [sherlock.bike](https://sherlock.bike) API. It has been reverse
engineered from the [Android app](https://play.google.com/store/apps/details?id=bike.sherlock.app).

## Installation

```bash
pip install sherlockbikepy
```

## Code snippet

```python
from sherlockbikepy import Sherlock

# Login
sh = Sherlock('user@example.com', 'supaSecretPassw0rd')

# Get devices
sh.devices
# > []

# Primary device (ie. the first one)
sh.primary_device
# >

# Device state
sh.primary_device.state
# > 'ON'

# Device location (only available if currently armed ie. "ON")
sh.primary_device.location
# > Position(latitude=20.6297038,
# > longitude=2.8123654,
# > last_update=datetime.datetime(2018, 9, 22, 15, 55, 42))
```