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.4.tar.gz (3.4 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.4-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: klarity-connector-0.1.4.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for klarity-connector-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a3d1025beb6f23715d45ae5121033a6df8e1fc3ce0b6d66ad4b7bcd0f16109ff
MD5 cf5ef5ff20861fa580e37c2c1693a0cd
BLAKE2b-256 a0170107696c602a2d82f4b1a4fb21945ca60d8fe935ac678596313d2593d804

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for klarity_connector-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e12fd04d09b855aba86febbec5e0541ffebce12dc5e43a66087dbfe6901683cf
MD5 ad15cd48c1cfaee4adaae1a4b65d96ee
BLAKE2b-256 3b88d677a3c866f2e261eef1347cf2c7f5a563958f0c30ec646796d5f9e90037

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