Skip to main content

ObservabilityAPI

Observability API

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

  • API version: 1.0.2
  • Package version: 1.0.2
  • Generator version: 7.11.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/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:

import ObservabilityAPI

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 ObservabilityAPI

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import ObservabilityAPI
from ObservabilityAPI.rest import ApiException
from pprint import pprint

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



# Enter a context with an instance of the API client
with ObservabilityAPI.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ObservabilityAPI.GrafanaApi(api_client)
    datasource_name = 'datasource_name_example' # str | Name for the datasource
    datasource_type = prometheus # str | Type of datasource to create (default to prometheus)
    datasource_url = 'datasource_url_example' # str | URL of the datasource endpoint
    service_key = 'service_key_example' # str | Grafana service account key for authentication
    database_name = 'database_name_example' # str | Database name (for database datasources) (optional)
    username = 'username_example' # str | Username for datasource authentication (optional)
    password = 'password_example' # str | Password for datasource authentication (optional)
    is_default = False # bool | Set this datasource as default (optional) (default to False)
    basic_auth = False # bool | Enable basic authentication (optional) (default to False)

    try:
        # Add Datasource to Grafana
        api_response = api_instance.add_grafana_datasource(datasource_name, datasource_type, datasource_url, service_key, database_name=database_name, username=username, password=password, is_default=is_default, basic_auth=basic_auth)
        print("The response of GrafanaApi->add_grafana_datasource:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling GrafanaApi->add_grafana_datasource: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost/PhrameObservability

Class Method HTTP request Description
GrafanaApi add_grafana_datasource POST /grafana/datasource Add Datasource to Grafana
GrafanaApi deploy_grafana_dashboards GET /grafana Deploy Grafana Dashboards
GrafanaApi generate_grafana_service_key GET /grafana/auth Generate Grafana Service Account Key
PrometheusApi add_exporter_to_host PUT /prometheus Add/Update Specific Exporter for Host
PrometheusApi add_prometheus_target POST /prometheus Add Prometheus Monitoring Target
PrometheusApi get_prometheus_targets GET /prometheus Get Prometheus Targets Configuration
PrometheusApi remove_prometheus_target DELETE /prometheus Remove Prometheus Monitoring Target

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

max.smith@3adesign.co.uk

Metadata

Release files for ObservabilityAPI 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ObservabilityAPI 1.0.7
File Size Uploaded Provenance Actions
observabilityapi-1.0.7.tar.gz 34.6 kB Without provenance Details for observabilityapi-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ObservabilityAPI 1.0.7
File Interpreter ABI Platform Actions
observabilityapi-1.0.7-py3-none-any.whl Python 3 none any Details for observabilityapi-1.0.7-py3-none-any.whl

Total release size: 78.6 kB

Release files / observabilityapi-1.0.7.tar.gz

Download URL observabilityapi-1.0.7.tar.gz
Size 34.6 kB
Tags Source
SHA-256 checksum
How to use checksums
17a132c3ef1ea813137afe05ad3c099c3398c61f47771b6492f5b8dffdde87c4
BLAKE2b-256 checksum
How to use checksums
8821f630d9b0fb5a54c4f7d177fbfd8806942a83bb0cd5c3ab8daa40b5e6d352
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / observabilityapi-1.0.7-py3-none-any.whl

Download URL observabilityapi-1.0.7-py3-none-any.whl
Size 44.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e513d8d2bbe041ebf59b3a3b6c8e135ca2d09fc1102de0c9aba51d70c4b89887
BLAKE2b-256 checksum
How to use checksums
458615ac334b7f8b1d449e3d94c87d9f90b8ba249eca8b337afc1f7b749e9526
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for ObservabilityAPI 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page