WillNilges / pymeshdb

Python Client for MeshDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pymeshdb

Programmatic access to mesh core data, detailing our installs, members, etc.

To use an authorization token, use the "Authorize" button, and under "tokenAuth" enter Token before the content of your token, like this: Token xxxyyyyyzzz

If you have username/password credentials (like those used on the admin UI) you can login via the admin UI or DRF login page

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

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.7.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

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

pip install git+https://github.com/willnilges/pymeshdb.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/willnilges/pymeshdb.git)

Then import the package:

import pymeshdb

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 pymeshdb

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import pymeshdb
from pymeshdb.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 = pymeshdb.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with pymeshdb.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pymeshdb.APIStatusApi(api_client)

    try:
        # Check API status
        api_response = api_instance.api_v1_retrieve()
        print("The response of APIStatusApi->api_v1_retrieve:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling APIStatusApi->api_v1_retrieve: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
APIStatusApi api_v1_retrieve GET /api/v1/ Check API status
BuildingsApi api_v1_buildings_create POST /api/v1/buildings/
BuildingsApi api_v1_buildings_destroy DELETE /api/v1/buildings/{id}/
BuildingsApi api_v1_buildings_list GET /api/v1/buildings/
BuildingsApi api_v1_buildings_lookup_list GET /api/v1/buildings/lookup/
BuildingsApi api_v1_buildings_partial_update PATCH /api/v1/buildings/{id}/
BuildingsApi api_v1_buildings_retrieve GET /api/v1/buildings/{id}/
BuildingsApi api_v1_buildings_update PUT /api/v1/buildings/{id}/
DevicesApi api_v1_devices_create POST /api/v1/devices/
DevicesApi api_v1_devices_destroy DELETE /api/v1/devices/{id}/
DevicesApi api_v1_devices_list GET /api/v1/devices/
DevicesApi api_v1_devices_lookup_list GET /api/v1/devices/lookup/
DevicesApi api_v1_devices_partial_update PATCH /api/v1/devices/{id}/
DevicesApi api_v1_devices_retrieve GET /api/v1/devices/{id}/
DevicesApi api_v1_devices_update PUT /api/v1/devices/{id}/
GeographicKMLDataApi api_v1_geography_whole_mesh_kml_retrieve GET /api/v1/geography/whole-mesh.kml Generate a KML file which contains all nodes and links on the mesh
InstallsApi api_v1_installs_create POST /api/v1/installs/
InstallsApi api_v1_installs_destroy DELETE /api/v1/installs/{install_number}/
InstallsApi api_v1_installs_list GET /api/v1/installs/
InstallsApi api_v1_installs_lookup_list GET /api/v1/installs/lookup/
InstallsApi api_v1_installs_partial_update PATCH /api/v1/installs/{install_number}/
InstallsApi api_v1_installs_retrieve GET /api/v1/installs/{install_number}/
InstallsApi api_v1_installs_update PUT /api/v1/installs/{install_number}/
LegacyQueryFormApi api_v1_query_buildings_list GET /api/v1/query/buildings/ Query & filter based on Building attributes. Results are returned as flattened spreadsheet row style output
LegacyQueryFormApi api_v1_query_installs_list GET /api/v1/query/installs/ Query & filter based on Install attributes. Results are returned as flattened spreadsheet row style output
LegacyQueryFormApi api_v1_query_members_list GET /api/v1/query/members/ Query & filter based on Member attributes. Results are returned as flattened spreadsheet row style output
LinksApi api_v1_links_create POST /api/v1/links/
LinksApi api_v1_links_destroy DELETE /api/v1/links/{id}/
LinksApi api_v1_links_list GET /api/v1/links/
LinksApi api_v1_links_lookup_list GET /api/v1/links/lookup/
LinksApi api_v1_links_partial_update PATCH /api/v1/links/{id}/
LinksApi api_v1_links_retrieve GET /api/v1/links/{id}/
LinksApi api_v1_links_update PUT /api/v1/links/{id}/
MembersApi api_v1_members_create POST /api/v1/members/
MembersApi api_v1_members_destroy DELETE /api/v1/members/{id}/
MembersApi api_v1_members_list GET /api/v1/members/
MembersApi api_v1_members_lookup_list GET /api/v1/members/lookup/
MembersApi api_v1_members_partial_update PATCH /api/v1/members/{id}/
MembersApi api_v1_members_retrieve GET /api/v1/members/{id}/
MembersApi api_v1_members_update PUT /api/v1/members/{id}/
NodesApi api_v1_nodes_create POST /api/v1/nodes/
NodesApi api_v1_nodes_destroy DELETE /api/v1/nodes/{network_number}/
NodesApi api_v1_nodes_list GET /api/v1/nodes/
NodesApi api_v1_nodes_lookup_list GET /api/v1/nodes/lookup/
NodesApi api_v1_nodes_partial_update PATCH /api/v1/nodes/{network_number}/
NodesApi api_v1_nodes_retrieve GET /api/v1/nodes/{network_number}/
NodesApi api_v1_nodes_update PUT /api/v1/nodes/{network_number}/
SectorsApi api_v1_sectors_create POST /api/v1/sectors/
SectorsApi api_v1_sectors_destroy DELETE /api/v1/sectors/{id}/
SectorsApi api_v1_sectors_list GET /api/v1/sectors/
SectorsApi api_v1_sectors_lookup_list GET /api/v1/sectors/lookup/
SectorsApi api_v1_sectors_partial_update PATCH /api/v1/sectors/{id}/
SectorsApi api_v1_sectors_retrieve GET /api/v1/sectors/{id}/
SectorsApi api_v1_sectors_update PUT /api/v1/sectors/{id}/
UserFormsApi api_v1_join_create POST /api/v1/join/ Register a new request for a potential mesh Install. Used by the join form posted on the nycmesh.net website
UserFormsApi api_v1_nn_assign_create POST /api/v1/nn-assign/ Assign a network number to a given Install object. Used by the NN Assignment form
WebsiteMapDataApi api_v1_mapdata_links_list GET /api/v1/mapdata/links/ Complete list of all Links, unpaginated, in the format expected by the website map. (Warning: This endpoint is a legacy format and may be deprecated/removed in the future)
WebsiteMapDataApi api_v1_mapdata_nodes_list GET /api/v1/mapdata/nodes/ Complete list of all "Nodes" (mostly Installs with some fake installs generated to solve NN re-use), unpaginated, in the format expected by the website map. (Warning: This endpoint is a legacy format and may be deprecated/removed in the future)
WebsiteMapDataApi api_v1_mapdata_sectors_list GET /api/v1/mapdata/sectors/ Complete list of all Sectors, unpaginated, in the format expected by the website map. (Warning: This endpoint is a legacy format and may be deprecated/removed in the future)
ApiApi api_v1_update_panoramas_create POST /api/v1/update-panoramas/

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

Session ID

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

tokenAuth

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

Author

About

Python Client for MeshDB


Languages

Language:Python 99.8%Language:Shell 0.2%