The unofficial simple client for carriots platform (in progress) (python 2.x/3.x)
Project description
clicarriots (version 0.2.0)
The unofficial simple client for carriots platform (in progress) (python 2.x/3.x)
You can find more information about carriots in http://www.carriots.com/
This client only support part of API from Carriots.com: Stream and Device.
Forum: http://forum.carriots.com/
Blog: https://blog.carriots.com/
Author
Samuel de Ancos Martín (Core developer Carriots)
My Email: sdeancos@gmail.com
My Website: http://www.deancos.com
Install
$ pip install clicarriots
Usage
Stream
Example send stream
from clicarriots import api
from datetime import datetime
client_stream = api.Stream("YOUR APIKEY")
my_at = datetime.now()
#my_at = 'now'
data = {"KEY":"VALUE"}
code, response = client_stream.send('ID_DEVELOPER_DEVICE', data, my_at, 'stream')
print(code, response)
Example get stream
from clicarriots import api
from datetime import datetime
client_stream = api.Stream("YOUR APIKEY")
code, response = client_stream.get("ID_DEVELOPER_Stream")
print(code, response)
Example get list streams
from clicarriots import api
from datetime import datetime
client_stream = api.Stream("YOUR APIKEY")
#without params
code, response = client_stream.list()
#with params
code, response = client_stream.list({"device": "MY ID DEVELOPER DEVICE"})
print(code, response)
Dropbox
Example get urls dropbox
from clicarriots import api
client_dropbox = api.Dropbox("YOUR APIKEY")
code, response = client_dropbox.get("YOUR FILE IN DROPBOX", op = "all", mime = "video")
print(code, response)
Device
Example get a device
from clicarriots import api
client_device = api.Device("YOUR APIKEY")
code, response = client_device.get("ID_DEVELOPER_DEVICE")
print(code, response)
Example get list devices
from clicarriots import api
client_device = api.Device("YOUR APIKEY")
#without params
code, response = client_device.list()
#with params
code, response = client_device.list({"name": "MY DEVICE NAME"})
print(code, response)
Example create a device
from clicarriots import api
client_device = api.Device("YOUR APIKEY")
data = {} # Valid json
code, response = client_device.create(data)
print(code, response)
Example update a device
from clicarriots import api
client_device = api.Device("YOUR APIKEY")
data = {} # Valid json
code, response = client_device.update("ID_DEVELOPER_DEVICE", data)
print(code, response)
Example delete a device
from clicarriots import api
client_device = api.Device("YOUR APIKEY")
code, response = client_device.delete("ID_DEVELOPER_DEVICE")
print(code, response)
Example get types and sensors
from clicarriots import api
client_device = api.Device("YOUR APIKEY")
# Get Types
code, response = client_device.get_types()
# Get Sensors
code, response = client_device.get_sensors()
print(code, response)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clicarriots-0.2.0.tar.gz.
File metadata
- Download URL: clicarriots-0.2.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2194db0ed71a8961a4142066d04f612cfd7331860a0f4ce31740d9f9083d9c
|
|
| MD5 |
f562571fd9c563aaeeab3199fcf1e309
|
|
| BLAKE2b-256 |
45bcbce9b638dc7bb92b5e02616db5ea7232b7760358e0455c289487ad4fe978
|
File details
Details for the file clicarriots-0.2.0-py3-none-any.whl.
File metadata
- Download URL: clicarriots-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
699a617686a5f268580658b3ac0f35a25fa209f91e81a47bb40110837593872f
|
|
| MD5 |
ae8193bab4705c08dc98752aefd24f4c
|
|
| BLAKE2b-256 |
4fe7608693512403a919aa320984bbc174ed3a9520c650abbce791ee569e9d29
|