Client of the Pyronear API to help the fight against wildfires
Project description
API Client
Client for the Pyronear API
Table of Contents
Getting started
Prerequisites
- Python 3.6 (or more recent)
- pip
Installation
You can clone and install the project dependencies as follows:
$git clone https://github.com/pyronear/pyro-api.git
$pip install -e pyro-api/client/.
Usage
Import the client
from pyroclient import client
Create a client object by handling him the API keys
API_URL = "http://pyronear-api.herokuapp.com"
CREDENTIALS_LOGIN = "George Abitbol"
CREDENTIALS_PASSWORD = "AStrong Password"
api_client = client.Client(API_URL, CREDENTIALS_LOGIN, CREDENTIALS_PASSWORD)
Use it to query alerts:
# Send alerts:
api_client.send_alert()
# Send medias:
api_client.send_medias()
# Update your position:
api_client.update_location(lat, lon)
Documentation
The full project documentation is available here for detailed specifications. The documentation was built with Sphinx using a theme provided by Read the Docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyroclient-0.1.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for pyroclient-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2964f22f82802f5a55f98f04b3d515325257584cc66b760bc0fca6d05d59770f |
|
MD5 | 47df93a3b54f674881a23f978fbe6280 |
|
BLAKE2b-256 | df8dd831bee4dd596d05e73fba819f40cd0a08b0914853f071c80e4559dddf4c |