Skip to main content

Upstream Sensor Storage

Project description

upstream-api-client

Sensor Storage for Upstream data

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.1
  • Package version: 0.1.9
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Updating the Generated Client

This repository is automatically generated from the OpenAPI specification. To update the client when the API changes:

  1. Download the latest openapi.json from the API server and save it in the root directory
  2. Run the generator using Docker (requires Docker to be installed):
    make openapi
    
  3. Build the package:
    python -m build
    
  4. Upload to PyPI:
    twine upload dist/* --config-file ~/.pypirc
    

Setting up PyPI credentials

Create a ~/.pypirc file with your PyPI credentials:

[distutils]
index-servers =
    pypi

[pypi]
username = __token__
password = pypi-your-api-token-here

Replace pypi-your-api-token-here with your actual PyPI API token. You can generate tokens at https://pypi.org/manage/account/token/.

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install upstream-api-client

(you may need to run pip with root permission: sudo pip install git+https://github.com/In-For-Disaster-Analytics/upstream-python-api-client.git)

Then import the package:

import upstream_api_client

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 upstream_api_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import upstream_api_client
from upstream_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = upstream_api_client.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with upstream_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = upstream_api_client.AuthApi(api_client)
    username = 'username_example' # str |
    password = 'password_example' # str |
    grant_type = 'grant_type_example' # str |  (optional)
    scope = '' # str |  (optional) (default to '')
    client_id = 'client_id_example' # str |  (optional)
    client_secret = 'client_secret_example' # str |  (optional)

    try:
        # Login
        api_response = api_instance.login_api_v1_token_post(username, password, grant_type=grant_type, scope=scope, client_id=client_id, client_secret=client_secret)
        print("The response of AuthApi->login_api_v1_token_post:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuthApi->login_api_v1_token_post: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AuthApi login_api_v1_token_post POST /api/v1/token Login
CampaignsApi create_campaign_api_v1_campaigns_post POST /api/v1/campaigns Create Campaign
CampaignsApi delete_sensor_api_v1_campaigns_campaign_id_delete DELETE /api/v1/campaigns/{campaign_id} Delete Sensor
CampaignsApi get_campaign_api_v1_campaigns_campaign_id_get GET /api/v1/campaigns/{campaign_id} Get Campaign
CampaignsApi list_campaigns_api_v1_campaigns_get GET /api/v1/campaigns List Campaigns
CampaignsApi partial_update_campaign_api_v1_campaigns_campaign_id_patch PATCH /api/v1/campaigns/{campaign_id} Partial Update Campaign
CampaignsApi update_campaign_api_v1_campaigns_campaign_id_put PUT /api/v1/campaigns/{campaign_id} Update Campaign
MeasurementsApi create_measurement_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_measurements_post POST /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id}/measurements Create Measurement
MeasurementsApi delete_sensor_measurements_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_measurements_delete DELETE /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id}/measurements Delete Sensor Measurements
MeasurementsApi get_measurements_with_confidence_intervals_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_measurements_confidence_intervals_get GET /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id}/measurements/confidence-intervals Get Measurements With Confidence Intervals
MeasurementsApi get_sensor_measurements_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_measurements_get GET /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id}/measurements Get Sensor Measurements
MeasurementsApi partial_update_sensor_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_measurements_measurement_id_patch PATCH /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id}/measurements/{measurement_id} Partial Update Sensor
MeasurementsApi update_sensor_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_measurements_measurement_id_put PUT /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id}/measurements/{measurement_id} Update Sensor
ProjectsApi get_project_members_for_user_api_v1_projects_project_id_members_get GET /api/v1/projects/{project_id}/members Get Project Members For User
ProjectsApi get_projects_api_v1_projects_get GET /api/v1/projects Get Projects
SensorVariablesApi list_sensor_variables_api_v1_sensor_variables_get GET /api/v1/sensor_variables List Sensor Variables
SensorsApi delete_sensor_api_v1_campaigns_campaign_id_stations_station_id_sensors_delete DELETE /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors Delete Sensor
SensorsApi force_update_sensor_statistics_api_v1_campaigns_campaign_id_stations_station_id_sensors_statistics_post POST /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/statistics Force Update Sensor Statistics
SensorsApi force_update_single_sensor_statistics_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_statistics_post POST /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id}/statistics Force Update Single Sensor Statistics
SensorsApi get_sensor_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_get GET /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id} Get Sensor
SensorsApi list_sensors_api_v1_campaigns_campaign_id_stations_station_id_sensors_get GET /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors List Sensors
SensorsApi partial_update_sensor_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_patch PATCH /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id} Partial Update Sensor
SensorsApi update_sensor_api_v1_campaigns_campaign_id_stations_station_id_sensors_sensor_id_put PUT /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/{sensor_id} Update Sensor
StationsApi create_station_api_v1_campaigns_campaign_id_stations_post POST /api/v1/campaigns/{campaign_id}/stations Create Station
StationsApi delete_sensor_api_v1_campaigns_campaign_id_stations_delete DELETE /api/v1/campaigns/{campaign_id}/stations Delete Sensor
StationsApi export_measurements_csv_api_v1_campaigns_campaign_id_stations_station_id_measurements_export_get GET /api/v1/campaigns/{campaign_id}/stations/{station_id}/measurements/export Export Measurements Csv
StationsApi export_sensors_csv_api_v1_campaigns_campaign_id_stations_station_id_sensors_export_get GET /api/v1/campaigns/{campaign_id}/stations/{station_id}/sensors/export Export Sensors Csv
StationsApi get_station_api_v1_campaigns_campaign_id_stations_station_id_get GET /api/v1/campaigns/{campaign_id}/stations/{station_id} Get Station
StationsApi list_stations_api_v1_campaigns_campaign_id_stations_get GET /api/v1/campaigns/{campaign_id}/stations List Stations
StationsApi partial_update_station_api_v1_campaigns_campaign_id_stations_station_id_patch PATCH /api/v1/campaigns/{campaign_id}/stations/{station_id} Partial Update Station
StationsApi update_station_api_v1_campaigns_campaign_id_stations_station_id_put PUT /api/v1/campaigns/{campaign_id}/stations/{station_id} Update Station
UploadfileCsvApi post_sensor_and_measurement_api_v1_uploadfile_csv_campaign_campaign_id_station_station_id_sensor_post POST /api/v1/uploadfile_csv/campaign/{campaign_id}/station/{station_id}/sensor Post Sensor And Measurement

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

OAuth2PasswordBearer

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes: N/A

Author

wmobley@tacc.utexas.edu

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

upstream_api_client-0.1.9.tar.gz (67.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

upstream_api_client-0.1.9-py3-none-any.whl (135.4 kB view details)

Uploaded Python 3

File details

Details for the file upstream_api_client-0.1.9.tar.gz.

File metadata

  • Download URL: upstream_api_client-0.1.9.tar.gz
  • Upload date:
  • Size: 67.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for upstream_api_client-0.1.9.tar.gz
Algorithm Hash digest
SHA256 9817673d01be672d67301211e7ed99c4f6511e36fd819f7c20f865b67fc17c7c
MD5 02134e1e7530b7c2ff4dbc5630add5d7
BLAKE2b-256 1114c63d937449457af56f687d75e40e0d2002d94663089868feb589ad13a2c9

See more details on using hashes here.

File details

Details for the file upstream_api_client-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for upstream_api_client-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7d707c5ee12c7e5fc3249e657f436544120a51d3aee11a31a9c6e7cf85b5643e
MD5 bfa145e8ce2ceb61cbbd2e000fa350f6
BLAKE2b-256 58c7663206f6648c09ed7d267d53dd17980c99827f557b8c290066dd358bdcb3

See more details on using hashes here.

Supported by

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