Antares Python
This is a Python library to simplify the connection to Antares IoT Platform. For more information about the platform itself, please visit the .
Installation
Make sure you have Python (2 or 3) and pip installed.
pip install antares-http
Usage Example
Send data
from antares_http import antares
antares.setDebug(True)
antares.setAccessKey('your-access-key')
myData = {
'temp' : 77,
'windsp' : 10
}
antares.send(myData, 'your-project-name', 'your-device-name')
Get latest data
from antares_http import antares
antares.setDebug(False)
antares.setAccessKey('your-access-key')
latestData = antares.get('your-project-name', 'your-device-name')
print(latestData['content'])
API Reference
-
setAccessKey(access-key)
Set theaccess-keyparameter to your Antares access key. -
setDebug(status)
Set whether you want to show debug results of every HTTP request to Antares or not, can be set toTrueorFalse. -
get(projectName, deviceName)
Get the latest data from your Antares device.
return: latest data (json) -
getAll(projectName, deviceName, limit=integer)
Get a chunk of data from your Antares project, you can set the limitation by setting thelimitparameter.
return: Chunk of data from your Antares device -
getAllId(projectName, deviceName, limit=integer)
Get a chunk of data IDs from your Antares project, you can set the limitation by setting thelimitparameter.
return: Chunk of data IDs from your Antares device -
getSpecific(projectName, deviceName, data-id)
Get specific data from your Antares device, thedata-idparameter looks like this:cin_81723819.
return: Specific device data -
getDeviceId(projectName, deviceName)
Get your Antares device ID.
return: antares device ID (i.e.cnt-44637281) -
send(data, projectName, deviceName)
Send data to your Antares project. This can be a python dictionary or string.
return: POST response data from Antares -
sendById(data, device-id)
Send data to your Antares device through Antares device ID which looks likecnt-281727372
return: POST response data from Antares -
createDevice(projectName, newDeviceName)
Create an Antares device in your Project.
return: device creation response -
getDevices(projectName)
Get all device names of Antares project
return: antares device names
Metadata
Release files for antares-http 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| antares-http-1.1.4.tar.gz | 3.7 kB | Without provenance | Details for antares-http-1.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| antares_http-1.1.4-py3-none-any.whl | Python 3 | none | any | Details for antares_http-1.1.4-py3-none-any.whl |
Total release size: 8.6 kB
Release files / antares-http-1.1.4.tar.gz
| Download URL | antares-http-1.1.4.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22686dc364a7375f2b6ede202a6bbf5374f044607b631a2e6e5de96536580761
|
|
BLAKE2b-256 checksum How to use checksums |
79c37a8c11ca5894e6c9fea31a6010a18e209a3bda6cdbda9a48caf8c20b7cc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / antares_http-1.1.4-py3-none-any.whl
| Download URL | antares_http-1.1.4-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4a31a1d7b5edd17c38b191875c948eab85dedb6e05e3ae79bc12a33acb10aa0
|
|
BLAKE2b-256 checksum How to use checksums |
b36847b84d56fc2a6f317958cc7984cdb69feafd87ef5131f25499bf10fa1a61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for antares-http 1.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.