Skip to main content

Python connector to GraphQL API of Klarity

Project description

Klarity Connector

Python connector for Klarity API

Installation

pip install klarity-connector

Usage

from klarity_connector import KlarityConnector

# Create a connector
connector = KlarityConnector(
    region='eu'
    api_key='YOUR_API_KEY',
)

# Sending GraphQL query
query = """
    query applications{
        applicationsPaginated(limit: 100, page: 0){
            results{
                name,
                cost{
                    currentMonth
                }
            }
        }
    }
"""

response = connector.graphql_request(query)

# Sending GraphQL mutation
mutation = """
    mutation createApplication($name: String!, $description: String){
        createApplication(name: $name, description: $description){
            name
        }
    }
"""

variables = {
    'name': 'My new application',
    'description': 'My new application description'
}

response = connector.graphql_request(mutation, variables)

Official product documentation

docs

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

klarity-connector-0.1.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

klarity_connector-0.1.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file klarity-connector-0.1.3.tar.gz.

File metadata

  • Download URL: klarity-connector-0.1.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for klarity-connector-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c1ed8bd76ec4234735a0538508775886fc7bdaa3994067c0cb74dfe61373ff4c
MD5 cf2b94c8b72ef9a276c98b82220993fa
BLAKE2b-256 3343ab8d07967cf81ac9c2dfa1fd31cb03083fa73791712d49343f1d5b124729

See more details on using hashes here.

File details

Details for the file klarity_connector-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for klarity_connector-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2584492bd999b28b43f30e9149abf6dc8ddb2c556f7ca67402db15256c604685
MD5 c708b7672e973fc68292f6bb277b7375
BLAKE2b-256 5e1ba4ffebea5b008738a6b97916909956c07d5884ab8138625cc63cd85f3d38

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