# sensorpush-api
This is a swagger definition for the SensorPush public REST API. Download the definition file [here](https://api.sensorpush.com/api/v1/support/swagger/swagger-v1.json).
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: v1.0.20240803
- Package version: 2.1.1
- Generator version: 7.8.0
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
## Requirements.
Python 3.7+
## Installation & Usage
### pip install
If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
Then import the package:
```python
import sensorpush_api
```
### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
```python
import sensorpush_api
```
### Tests
Execute `pytest` to run the tests.
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
import time
import sensorpush_api
from sensorpush_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sensorpush.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = sensorpush_api.Configuration(
host = "https://api.sensorpush.com/api/v1"
)
# Enter a context with an instance of the API client
async with sensorpush_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sensorpush_api.ApiApi(api_client)
access_token_request = sensorpush_api.AccessTokenRequest() # AccessTokenRequest |
try:
# Request a temporary oAuth access code.
api_response = await api_instance.access_token(access_token_request)
print("The response of ApiApi->access_token:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ApiApi->access_token: %s\n" % e)
```
## Documentation for API Endpoints
All URIs are relative to *https://api.sensorpush.com/api/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ApiApi* | [**access_token**](docs/ApiApi.md#access_token) | **POST** /oauth/accesstoken | Request a temporary oAuth access code.
*ApiApi* | [**download**](docs/ApiApi.md#download) | **POST** /reports/download | Download bulk reports.
*ApiApi* | [**gateways**](docs/ApiApi.md#gateways) | **POST** /devices/gateways | Lists all gateways.
*ApiApi* | [**list**](docs/ApiApi.md#list) | **POST** /reports/list | Lists reports available for download.
*ApiApi* | [**oauth_authorize_post**](docs/ApiApi.md#oauth_authorize_post) | **POST** /oauth/authorize | Sign in and request an authorization code
*ApiApi* | [**root_post**](docs/ApiApi.md#root_post) | **POST** / | SensorPush API status
*ApiApi* | [**samples**](docs/ApiApi.md#samples) | **POST** /samples | Queries for sensor samples.
*ApiApi* | [**sensors**](docs/ApiApi.md#sensors) | **POST** /devices/sensors | Lists all sensors.
*ApiApi* | [**tags_response**](docs/ApiApi.md#tags_response) | **POST** /tags | Updates tags on devices.
*ApiApi* | [**token**](docs/ApiApi.md#token) | **POST** /oauth/token | oAuth 2.0 for authorization, access, and refresh tokens
## Documentation For Models
- [AccessTokenRequest](docs/AccessTokenRequest.md)
- [AccessTokenResponse](docs/AccessTokenResponse.md)
- [AuthorizeRequest](docs/AuthorizeRequest.md)
- [AuthorizeResponse](docs/AuthorizeResponse.md)
- [Error](docs/Error.md)
- [Gateway](docs/Gateway.md)
- [GatewaysRequest](docs/GatewaysRequest.md)
- [ListResponse](docs/ListResponse.md)
- [ReportListing](docs/ReportListing.md)
- [ReportsRequest](docs/ReportsRequest.md)
- [Sample](docs/Sample.md)
- [Samples](docs/Samples.md)
- [SamplesRequest](docs/SamplesRequest.md)
- [Sensor](docs/Sensor.md)
- [SensorAlerts](docs/SensorAlerts.md)
- [SensorAlertsHumidity](docs/SensorAlertsHumidity.md)
- [SensorAlertsTemperature](docs/SensorAlertsTemperature.md)
- [SensorCalibration](docs/SensorCalibration.md)
- [SensorsRequest](docs/SensorsRequest.md)
- [Status](docs/Status.md)
- [Tags](docs/Tags.md)
- [TagsRequest](docs/TagsRequest.md)
- [TagsResponse](docs/TagsResponse.md)
- [TokenRequest](docs/TokenRequest.md)
- [TokenResponse](docs/TokenResponse.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Authentication schemes defined for the API:
<a id="oauth"></a>
### oauth
- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header
Raw data
{
"_id": null,
"home_page": "https://github.com/sstallion/sensorpush-api",
"name": "sensorpush-api",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "sensorpush swagger",
"author": "Steven Stallion",
"author_email": "sstallion@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e7/93/763b631d4d4b49e65284cc5bfbcf9d490e8652cc3a8e758af2b3923de529/sensorpush_api-2.1.1.tar.gz",
"platform": null,
"description": "# sensorpush-api\nThis is a swagger definition for the SensorPush public REST API. Download the definition file [here](https://api.sensorpush.com/api/v1/support/swagger/swagger-v1.json).\n\nThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: v1.0.20240803\n- Package version: 2.1.1\n- Generator version: 7.8.0\n- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen\n\n## Requirements.\n\nPython 3.7+\n\n## Installation & Usage\n### pip install\n\nIf the python package is hosted on a repository, you can install directly using:\n\n```sh\npip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git\n```\n(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)\n\nThen import the package:\n```python\nimport sensorpush_api\n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport sensorpush_api\n```\n\n### Tests\n\nExecute `pytest` to run the tests.\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\n\nimport time\nimport sensorpush_api\nfrom sensorpush_api.rest import ApiException\nfrom pprint import pprint\n\n# Defining the host is optional and defaults to https://api.sensorpush.com/api/v1\n# See configuration.py for a list of all supported configuration parameters.\nconfiguration = sensorpush_api.Configuration(\n host = \"https://api.sensorpush.com/api/v1\"\n)\n\n\n\n# Enter a context with an instance of the API client\nasync with sensorpush_api.ApiClient(configuration) as api_client:\n # Create an instance of the API class\n api_instance = sensorpush_api.ApiApi(api_client)\n access_token_request = sensorpush_api.AccessTokenRequest() # AccessTokenRequest | \n\n try:\n # Request a temporary oAuth access code.\n api_response = await api_instance.access_token(access_token_request)\n print(\"The response of ApiApi->access_token:\\n\")\n pprint(api_response)\n except ApiException as e:\n print(\"Exception when calling ApiApi->access_token: %s\\n\" % e)\n\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *https://api.sensorpush.com/api/v1*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*ApiApi* | [**access_token**](docs/ApiApi.md#access_token) | **POST** /oauth/accesstoken | Request a temporary oAuth access code.\n*ApiApi* | [**download**](docs/ApiApi.md#download) | **POST** /reports/download | Download bulk reports.\n*ApiApi* | [**gateways**](docs/ApiApi.md#gateways) | **POST** /devices/gateways | Lists all gateways.\n*ApiApi* | [**list**](docs/ApiApi.md#list) | **POST** /reports/list | Lists reports available for download.\n*ApiApi* | [**oauth_authorize_post**](docs/ApiApi.md#oauth_authorize_post) | **POST** /oauth/authorize | Sign in and request an authorization code\n*ApiApi* | [**root_post**](docs/ApiApi.md#root_post) | **POST** / | SensorPush API status\n*ApiApi* | [**samples**](docs/ApiApi.md#samples) | **POST** /samples | Queries for sensor samples.\n*ApiApi* | [**sensors**](docs/ApiApi.md#sensors) | **POST** /devices/sensors | Lists all sensors.\n*ApiApi* | [**tags_response**](docs/ApiApi.md#tags_response) | **POST** /tags | Updates tags on devices.\n*ApiApi* | [**token**](docs/ApiApi.md#token) | **POST** /oauth/token | oAuth 2.0 for authorization, access, and refresh tokens\n\n\n## Documentation For Models\n\n - [AccessTokenRequest](docs/AccessTokenRequest.md)\n - [AccessTokenResponse](docs/AccessTokenResponse.md)\n - [AuthorizeRequest](docs/AuthorizeRequest.md)\n - [AuthorizeResponse](docs/AuthorizeResponse.md)\n - [Error](docs/Error.md)\n - [Gateway](docs/Gateway.md)\n - [GatewaysRequest](docs/GatewaysRequest.md)\n - [ListResponse](docs/ListResponse.md)\n - [ReportListing](docs/ReportListing.md)\n - [ReportsRequest](docs/ReportsRequest.md)\n - [Sample](docs/Sample.md)\n - [Samples](docs/Samples.md)\n - [SamplesRequest](docs/SamplesRequest.md)\n - [Sensor](docs/Sensor.md)\n - [SensorAlerts](docs/SensorAlerts.md)\n - [SensorAlertsHumidity](docs/SensorAlertsHumidity.md)\n - [SensorAlertsTemperature](docs/SensorAlertsTemperature.md)\n - [SensorCalibration](docs/SensorCalibration.md)\n - [SensorsRequest](docs/SensorsRequest.md)\n - [Status](docs/Status.md)\n - [Tags](docs/Tags.md)\n - [TagsRequest](docs/TagsRequest.md)\n - [TagsResponse](docs/TagsResponse.md)\n - [TokenRequest](docs/TokenRequest.md)\n - [TokenResponse](docs/TokenResponse.md)\n\n\n<a id=\"documentation-for-authorization\"></a>\n## Documentation For Authorization\n\n\nAuthentication schemes defined for the API:\n<a id=\"oauth\"></a>\n### oauth\n\n- **Type**: API key\n- **API key parameter name**: Authorization\n- **Location**: HTTP header\n",
"bugtrack_url": null,
"license": "BSD-2-Clause",
"summary": "SensorPush Public API",
"version": "2.1.1",
"project_urls": {
"Homepage": "https://github.com/sstallion/sensorpush-api"
},
"split_keywords": [
"sensorpush",
"swagger"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e9642dc4337c375ed97f952af16b5c1ca25dfa306320dd69273a6b670ca5e1d1",
"md5": "36659c494cdd7ff85d372eee373a1369",
"sha256": "694c9a732fe57200eaef3e04c6d99eb43ba101b741d9d340dc890bc3b15353b3"
},
"downloads": -1,
"filename": "sensorpush_api-2.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "36659c494cdd7ff85d372eee373a1369",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 79684,
"upload_time": "2024-12-29T22:05:57",
"upload_time_iso_8601": "2024-12-29T22:05:57.418025Z",
"url": "https://files.pythonhosted.org/packages/e9/64/2dc4337c375ed97f952af16b5c1ca25dfa306320dd69273a6b670ca5e1d1/sensorpush_api-2.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e793763b631d4d4b49e65284cc5bfbcf9d490e8652cc3a8e758af2b3923de529",
"md5": "51902617b5890421222eef4cdd7292d8",
"sha256": "6a168d3b7507fc402566c6c94f90580406f0c2d4162d8c67f6f031870d84e500"
},
"downloads": -1,
"filename": "sensorpush_api-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "51902617b5890421222eef4cdd7292d8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 35202,
"upload_time": "2024-12-29T22:05:59",
"upload_time_iso_8601": "2024-12-29T22:05:59.067178Z",
"url": "https://files.pythonhosted.org/packages/e7/93/763b631d4d4b49e65284cc5bfbcf9d490e8652cc3a8e758af2b3923de529/sensorpush_api-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-29 22:05:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sstallion",
"github_project": "sensorpush-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "python_dateutil",
"specs": [
[
">=",
"2.5.3"
]
]
},
{
"name": "setuptools",
"specs": [
[
">=",
"21.0.0"
]
]
},
{
"name": "urllib3",
"specs": [
[
"<",
"2.1.0"
],
[
">=",
"1.25.3"
]
]
},
{
"name": "pydantic",
"specs": [
[
">=",
"1.10.5"
]
]
},
{
"name": "aenum",
"specs": [
[
">=",
"3.1.11"
]
]
},
{
"name": "aiohttp",
"specs": [
[
">=",
"3.0.0"
]
]
}
],
"tox": true,
"lcname": "sensorpush-api"
}