Python-based library for accessing the Blues Notehub API.
Project description
notehub-py
The OpenAPI definition for the Notehub.io API.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.2.0
- Package version: 1.0.3
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://dev.blues.io/support/
Requirements.
Python 3.7+
Installation & Usage
pip install
With pip
via PyPy:
python3 -m pip install notehub-py
(you may need to run pip
with root permission: sudo python3 -m pip install notehub-py
)
or
python3 -m pip3 install notehub-py
Then import the package:
import notehub_py
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import notehub_py
Tests
Execute pytest
to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = notehub_py.AlertApi(api_client)
project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str |
page_size = 50 # int | (optional) (default to 50)
page_num = 1 # int | (optional) (default to 1)
monitor_uid = 'monitor_uid_example' # str | (optional)
try:
api_response = api_instance.get_alerts(project_uid, page_size=page_size, page_num=page_num, monitor_uid=monitor_uid)
print("The response of AlertApi->get_alerts:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AlertApi->get_alerts: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.notefile.net
Class | Method | HTTP request | Description |
---|---|---|---|
AlertApi | get_alerts | GET /v1/projects/{projectUID}/alerts | |
AuthorizationApi | login | POST /auth/login | |
BillingAccountApi | get_billing_accounts | GET /v1/billing-accounts | |
DeviceApi | delete_device_environment_variable | DELETE /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables/{key} | |
DeviceApi | delete_project_device | DELETE /v1/projects/{projectUID}/devices/{deviceUID} | |
DeviceApi | disable_device | POST /v1/projects/{projectUID}/devices/{deviceUID}/disable | |
DeviceApi | disable_device_connectivity_assurance | POST /v1/projects/{projectUID}/devices/{deviceUID}/disable-connectivity-assurance | |
DeviceApi | enable_device | POST /v1/projects/{projectUID}/devices/{deviceUID}/enable | |
DeviceApi | enable_device_connectivity_assurance | POST /v1/projects/{projectUID}/devices/{deviceUID}/enable-connectivity-assurance | |
DeviceApi | get_device | GET /v1/projects/{projectUID}/devices/{deviceUID} | |
DeviceApi | get_device_environment_variables | GET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables | |
DeviceApi | get_device_environment_variables_by_pin | GET /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin | |
DeviceApi | get_device_health_log | GET /v1/projects/{projectUID}/devices/{deviceUID}/health-log | |
DeviceApi | get_device_latest | GET /v1/projects/{projectUID}/devices/{deviceUID}/latest | |
DeviceApi | get_device_public_key | GET /v1/projects/{projectUID}/devices/{deviceUID}/public-key | |
DeviceApi | get_device_sessions | GET /v1/projects/{projectUID}/devices/{deviceUID}/sessions | |
DeviceApi | get_project_device_public_keys | GET /v1/projects/{projectUID}/devices/public-keys | |
DeviceApi | get_project_devices | GET /v1/projects/{projectUID}/devices | |
DeviceApi | get_project_fleet_devices | GET /v1/projects/{projectUID}/fleets/{fleetUID}/devices | |
DeviceApi | handle_note_add | POST /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID} | |
DeviceApi | handle_note_changes | GET /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/changes | |
DeviceApi | handle_note_create_add | POST /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID} | |
DeviceApi | handle_note_delete | DELETE /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID} | |
DeviceApi | handle_note_get | GET /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID} | |
DeviceApi | handle_note_signal | POST /v1/projects/{projectUID}/devices/{deviceUID}/signal | |
DeviceApi | handle_note_update | PUT /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID} | |
DeviceApi | handle_notefile_changes | GET /v1/projects/{projectUID}/devices/{deviceUID}/files/changes | |
DeviceApi | handle_notefile_changes_pending | GET /v1/projects/{projectUID}/devices/{deviceUID}/files/changes/pending | |
DeviceApi | handle_notefile_delete | DELETE /v1/projects/{projectUID}/devices/{deviceUID}/files | |
DeviceApi | post_provision_project_device | POST /v1/projects/{projectUID}/devices/{deviceUID}/provision | |
DeviceApi | put_device_environment_variables | PUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables | |
DeviceApi | put_device_environment_variables_by_pin | PUT /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin | |
EventApi | get_fleet_events | GET /v1/projects/{projectUID}/fleets/{fleetUID}/events | |
EventApi | get_fleet_events_by_cursor | GET /v1/projects/{projectUID}/fleets/{fleetUID}/events-cursor | |
EventApi | get_project_events | GET /v1/projects/{projectUID}/events | |
EventApi | get_project_events_by_cursor | GET /v1/projects/{projectUID}/events-cursor | |
EventApi | get_route_logs_by_event | GET /v1/projects/{projectUID}/events/{eventUID}/route-logs | |
MonitorApi | create_monitor | POST /v1/projects/{projectUID}/monitors | |
MonitorApi | delete_monitor | DELETE /v1/projects/{projectUID}/monitors/{monitorUID} | |
MonitorApi | get_monitor | GET /v1/projects/{projectUID}/monitors/{monitorUID} | |
MonitorApi | get_monitors | GET /v1/projects/{projectUID}/monitors | |
MonitorApi | update_monitor | PUT /v1/projects/{projectUID}/monitors/{monitorUID} | |
ProjectApi | clone_project | POST /v1/projects/{projectUID}/clone | |
ProjectApi | create_fleet | POST /v1/projects/{projectUID}/fleets | |
ProjectApi | create_product | POST /v1/projects/{projectUID}/products | |
ProjectApi | create_project | POST /v1/projects | |
ProjectApi | delete_device_fleets | DELETE /v1/projects/{projectUID}/devices/{deviceUID}/fleets | |
ProjectApi | delete_fleet | DELETE /v1/projects/{projectUID}/fleets/{fleetUID} | |
ProjectApi | delete_fleet_environment_variable | DELETE /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key} | |
ProjectApi | delete_project | DELETE /v1/projects/{projectUID} | |
ProjectApi | delete_project_environment_variable | DELETE /v1/projects/{projectUID}/environment_variables/{key} | |
ProjectApi | dfu_action | POST /v1/projects/{projectUID}/dfu/{firmwareType}/{action} | |
ProjectApi | disable_global_transformation | POST /v1/projects/{projectUID}/global-transformation/disable | |
ProjectApi | enable_global_transformation | POST /v1/projects/{projectUID}/global-transformation/enable | |
ProjectApi | get_device_dfu_history | GET /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/history | |
ProjectApi | get_device_dfu_status | GET /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/status | |
ProjectApi | get_device_fleets | GET /v1/projects/{projectUID}/devices/{deviceUID}/fleets | |
ProjectApi | get_devices_dfu_history | GET /v1/projects/{projectUID}/dfu/{firmwareType}/history | |
ProjectApi | get_devices_dfu_status | GET /v1/projects/{projectUID}/dfu/{firmwareType}/status | |
ProjectApi | get_firmware_info | GET /v1/projects/{projectUID}/firmware | |
ProjectApi | get_fleet_environment_variables | GET /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables | |
ProjectApi | get_project | GET /v1/projects/{projectUID} | |
ProjectApi | get_project_by_product | GET /v1/products/{productUID}/project | |
ProjectApi | get_project_environment_variables | GET /v1/projects/{projectUID}/environment_variables | |
ProjectApi | get_project_fleets | GET /v1/projects/{projectUID}/fleets | |
ProjectApi | get_project_members | GET /v1/projects/{projectUID}/members | |
ProjectApi | get_project_products | GET /v1/projects/{projectUID}/products | |
ProjectApi | get_projects | GET /v1/projects | |
ProjectApi | put_device_fleets | PUT /v1/projects/{projectUID}/devices/{deviceUID}/fleets | |
ProjectApi | put_fleet_environment_variables | PUT /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables | |
ProjectApi | put_project_environment_variables | PUT /v1/projects/{projectUID}/environment_variables | |
ProjectApi | set_global_transformation | POST /v1/projects/{projectUID}/global-transformation | |
ProjectApi | update_fleet | PUT /v1/projects/{projectUID}/fleets/{fleetUID} | |
RouteApi | create_route | POST /v1/projects/{projectUID}/routes | |
RouteApi | delete_route | DELETE /v1/projects/{projectUID}/routes/{routeUID} | |
RouteApi | get_route | GET /v1/projects/{projectUID}/routes/{routeUID} | |
RouteApi | get_route_logs_by_route | GET /v1/projects/{projectUID}/routes/{routeUID}/route-logs | |
RouteApi | get_routes | GET /v1/projects/{projectUID}/routes | |
RouteApi | update_route | PUT /v1/projects/{projectUID}/routes/{routeUID} |
Documentation For Models
- Alert
- AlertDataInner
- AlertNotificationsInner
- Aws
- Azure
- BillingAccount
- BillingAccountRole
- Body
- CloneProjectRequest
- Contact
- CreateFleetRequest
- CreateMonitor
- CreateProductRequest
- CreateProjectRequest
- CurrentFirmware
- DFUEnv
- DFUState
- DeleteDeviceFleetsRequest
- Device
- DeviceDfuHistory
- DeviceDfuHistoryPage
- DeviceDfuStateMachine
- DeviceDfuStateMachineNode
- DeviceDfuStatus
- DeviceDfuStatusCurrent
- DeviceDfuStatusPage
- DeviceSession
- DeviceTowerInfo
- DeviceUsage
- DfuActionRequest
- EmailNotification
- EnvironmentVariables
- Error
- Event
- Firmware
- FirmwareInfo
- Fleet
- GetAlerts200Response
- GetBillingAccounts200Response
- GetDeviceEnvironmentVariables200Response
- GetDeviceHealthLog200Response
- GetDeviceHealthLog200ResponseHealthLogInner
- GetDeviceLatest200Response
- GetDevicePublicKey200Response
- GetDeviceSessions200Response
- GetProjectDevicePublicKeys200Response
- GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner
- GetProjectDevices200Response
- GetProjectEvents200Response
- GetProjectEventsByCursor200Response
- GetProjectFleets200Response
- GetProjectMembers200Response
- GetProjectProducts200Response
- GetProjects200Response
- GetRouteLogsByRoute200ResponseInner
- HandleNoteChanges200Response
- HandleNoteGet200Response
- HandleNoteSignal200Response
- HandleNotefileChanges200Response
- HandleNotefileChangesPending200Response
- HandleNotefileDeleteRequest
- Http
- HttpFilter
- HttpTransform
- Location
- Login200Response
- LoginRequest
- Monitor
- MonitorAlertRoutesInner
- Mqtt
- Note
- NotehubRoute
- NotehubRouteSchema
- PostProvisionProjectDeviceRequest
- Product
- Project
- ProjectMember
- Proxy
- PutDeviceFleetsRequest
- Radresponder
- Role
- Slack
- SlackBearerNotification
- SlackWebHookNotification
- Snowflake
- SnowflakeTransform
- Thingworx
- TowerLocation
- Twilio
- UpdateFleetRequest
- UploadMetadata
- UserDbRoute
- UserDfuStateMachine
- UserDfuStateMachineStatus
- UserFirmwareInfo
Documentation For Authorization
Authentication schemes defined for the API:
api_key
- Type: API key
- API key parameter name: X-Session-Token
- Location: HTTP header
pin
- Type: API key
- API key parameter name: X-Auth-Token
- Location: HTTP header
Author
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
Hashes for notehub_py-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a0f1c2d096890e0b752731ce83236de9616bccb3c68318aaabbb5de01409f05 |
|
MD5 | 02ba622e0e651da3c48c6f4d7ddd59ba |
|
BLAKE2b-256 | 8c2aca84c45806dd0bf71663df5ea019c8a18105b1a01ada6d5ca88ad33b05ec |