Skip to main content

WhyLabs API client

Project description

whylabs-client

WhyLabs API that enables end-to-end AI observability

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

  • API version: 0.1
  • Package version: 0.4.2
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://whylabs.ai

Requirements.

Python >= 3.6

Getting Started

import time
import whylabs_client
from pprint import pprint
from whylabs_client.api import alerts_api
from whylabs_client.model.get_alerts_paths_response import GetAlertsPathsResponse
from whylabs_client.model.segment_tag import SegmentTag
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = whylabs_client.Configuration(
    host = "http://localhost"
)

# 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: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with whylabs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = alerts_api.AlertsApi(api_client)
    org_id = "org-123" # str | Your company's unique organization ID
model_id = "model-123" # str | The unique model ID in your company. The model is created if it doesn't exist already.
start_timestamp = 1577836800000 # int | Start time exclusive
end_timestamp = 1893456000000 # int | 
segment_tags = [
        SegmentTag(
            key="key_example",
            value="value_example",
        ),
    ] # [SegmentTag], none_type | List of (key, value) pair tags for a segment. Must not contain duplicate values (optional)
version = "" # str, none_type | the version of the alert in case we have multiple schemas (optional)

    try:
        # Get the alerts for a given time period.
        api_response = api_instance.get_alerts_paths(org_id, model_id, start_timestamp, end_timestamp, segment_tags=segment_tags, version=version)
        pprint(api_response)
    except whylabs_client.ApiException as e:
        print("Exception when calling AlertsApi->get_alerts_paths: %s\n" % e)

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

whylabs-client-0.4.2.tar.gz (90.9 kB view details)

Uploaded Source

Built Distribution

whylabs_client-0.4.2-py3-none-any.whl (370.7 kB view details)

Uploaded Python 3

File details

Details for the file whylabs-client-0.4.2.tar.gz.

File metadata

  • Download URL: whylabs-client-0.4.2.tar.gz
  • Upload date:
  • Size: 90.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for whylabs-client-0.4.2.tar.gz
Algorithm Hash digest
SHA256 387ec3e871bc19141c930ce4d3d0258d7997ae8b2e9a7055b38538696af1812d
MD5 0e8e116845e52434c00e2acd199a50e3
BLAKE2b-256 e13e50f91cf5f57e2521bef7988c21b332f9f247ad25b7f2a6a57c06cfee7d64

See more details on using hashes here.

File details

Details for the file whylabs_client-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: whylabs_client-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 370.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for whylabs_client-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3b191bfd9c24caeb587141c2c9da0d5b974a34774c42b2babaaaa11af5a3fc7c
MD5 c9d782e70b0319e85fc39712c6cf1a78
BLAKE2b-256 450a498b3858a9afd0cf7ec594df00c7cf2074961506c8d142a284cb867a9875

See more details on using hashes here.

Supported by

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