Skip to main content

smaXtec API client

Project description

# sxapi
smaXtec API Client

Python wrapper for the smaXtec public API

## Usage ##
To use the API smaXtec user credentials (smaXtec Messenger Account) are needed.

```
from sxapi import API

a = API(email="myuser@smaxtec.com", password="mypassword")

# Get organisations
orgas = a.organisations
print orgas

# Get Animals in an organisation
animals = orgas[0].animals
print animals
# Get Sensordata for an animal
data = animals[0].get_frame(["temp", "act"], days_back=10)
print(data)

# Get Events for an animal
events = animals[0].get_events()
print(events.to_series())

# Get by id
print a.get_organisation("5721e3f8a80a5f54c6315131").devices
print a.get_animal("572209c1a80a5f54c631513f").name
print a.get_animal("572209c1a80a5f54c631513f").heats
print a.get_animal("572209c1a80a5f54c631513f").lactations

# Show request stats
a.print_stats()
```

Project details


Download files

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

Source Distribution

sxapi-0.6.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

sxapi-0.6-py2-none-any.whl (9.0 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page