Skip to content

Mosquito-Alert/mosquito-alert-python-sdk

Repository files navigation

mosquito-alert

Introducing API v1 for Mosquito Alert platform, a project desgined to facilitate citizen science initiatives and enable collaboration among scientists, public health officials, and environmental managers in the investigation and control of disease-carrying mosquitoes.

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

  • API version: v1
  • Package version: 0.1.3
  • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.8+

Installation & Usage

pip install

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

pip install git+https://github.com/Mosquito-Alert/mosquito-alert-python-sdk.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/Mosquito-Alert/mosquito-alert-python-sdk.git)

Then import the package:

import mosquito_alert

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 mosquito_alert

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import mosquito_alert
from mosquito_alert.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.mosquitoalert.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = mosquito_alert.Configuration(
    host = "https://api.mosquitoalert.com/v1"
)

# 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 Bearer authorization (JWT): jwtAuth
configuration = mosquito_alert.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with mosquito_alert.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mosquito_alert.AuthApi(api_client)
    password_change_request = mosquito_alert.PasswordChangeRequest() # PasswordChangeRequest | 

    try:
        api_instance.change_password(password_change_request)
    except ApiException as e:
        print("Exception when calling AuthApi->change_password: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.mosquitoalert.com/v1

Class Method HTTP request Description
AuthApi change_password POST /auth/password/change/
AuthApi obtain_token POST /auth/token/
AuthApi refresh_token POST /auth/token/refresh/
AuthApi signup_guest POST /auth/signup/guest/
AuthApi verify_token POST /auth/token/verify/
BitesApi create POST /bites/
BitesApi destroy DELETE /bites/{uuid}/
BitesApi list GET /bites/
BitesApi list_mine GET /me/bites/
BitesApi retrieve GET /bites/{uuid}/
BreedingSitesApi create POST /breeding-sites/
BreedingSitesApi destroy DELETE /breeding-sites/{uuid}/
BreedingSitesApi list GET /breeding-sites/
BreedingSitesApi list_mine GET /me/breeding-sites/
BreedingSitesApi retrieve GET /breeding-sites/{uuid}/
CampaignsApi list GET /campaigns/
CampaignsApi retrieve GET /campaigns/{id}/
CountriesApi retrieve GET /countries/{id}/
DevicesApi create POST /devices/
DevicesApi partial_update PATCH /devices/{device_id}/
DevicesApi retrieve GET /devices/{device_id}/
DevicesApi update PUT /devices/{device_id}/
FixesApi create POST /fixes/
NotificationsApi create POST /notifications/
NotificationsApi list GET /notifications/
NotificationsApi list_mine GET /me/notifications/
NotificationsApi partial_update PATCH /notifications/{id}/
NotificationsApi retrieve GET /notifications/{id}/
NotificationsApi update PUT /notifications/{id}/
ObservationsApi create POST /observations/
ObservationsApi destroy DELETE /observations/{uuid}/
ObservationsApi list GET /observations/
ObservationsApi list_mine GET /me/observations/
ObservationsApi prediction_create POST /observations/{uuid}/prediction/
ObservationsApi prediction_destroy DELETE /observations/{uuid}/prediction/
ObservationsApi prediction_retrieve GET /observations/{uuid}/prediction/
ObservationsApi retrieve GET /observations/{uuid}/
PartnersApi list GET /partners/
PartnersApi retrieve GET /partners/{id}/
PhotosApi prediction_create POST /photos/{uuid}/prediction/
PhotosApi prediction_destroy DELETE /photos/{uuid}/prediction/
PhotosApi prediction_retrieve GET /photos/{uuid}/prediction/
PhotosApi retrieve GET /photos/{uuid}/
UsersApi partial_update PATCH /users/{uuid}/
UsersApi retrieve GET /users/{uuid}/
UsersApi retrieve_mine GET /me/
UsersApi update PUT /users/{uuid}/

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

cookieAuth

  • Type: API key
  • API key parameter name: sessionid
  • Location:

jwtAuth

  • Type: Bearer authentication (JWT)

tokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

it@mosquitoalert.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published