Skip to main content

Python client for devices interacting with configgery.com

Project description

Configgery Python client

Install

$ pip install configgery-client

Getting Started

This library allows you to fetch the latest set of configurations for your client.

First, add some configurations to a Client Group configgery.com Then, use this library to fetch those same configurations.

Once a client has identified itself, you will see it in the client list at configgery.com/<org_name>/clients/.

Fetching configurations

from configgery.client import Client

client = Client(API_KEY, "/path/to/store/configurations")
client.download_configurations()

Checking if up-to-date

from configgery.client import Client

client = Client(SDK_KEY, "/path/to/store/configurations")
client.identify("my_client_name")
client.check_latest()
print(client.is_download_needed())

Using a configuration

from configgery.client import Client

client = Client(SDK_KEY, "/path/to/store/configurations")
client.identify("my_client_name")
success, data = client.get_configuration('myconfiguration.json')

if success:
    print(data)
else:
    print('Could not find configuration')

Updating state

from configgery.client import Client, ClientState

client = Client(SDK_KEY, "/path/to/store/configurations")
client.identify("my_client_name")
client.download_configurations()
client.update_state(ClientState.Configurations_Applied)

if device_happy():  # your own check
    client.update_state(ClientState.Upvote)
else:
    client.update_state(ClientState.Downvote)

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

configgery_client-2.2.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

configgery_client-2.2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file configgery_client-2.2.0.tar.gz.

File metadata

  • Download URL: configgery_client-2.2.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for configgery_client-2.2.0.tar.gz
Algorithm Hash digest
SHA256 6025a47d1ead1fd3fb1f96d5c2a5375a18f974731b8a9776cf4d2b6049988950
MD5 c8fad292d398ab40084d3a7d363a59d0
BLAKE2b-256 14cb0ced8626bce3f77a5053a28900396bb3ab8277358d81fd195b1e9e5bffd0

See more details on using hashes here.

File details

Details for the file configgery_client-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for configgery_client-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7db32dfc04b0eb4f1453f89c2a54c57fc5cd2163073d18ba7c161182c15f28fe
MD5 2dd8e9e10832a00e962c191142eac34b
BLAKE2b-256 f77ac242432c497127c46943508a6dd244d552a63cb3b26db0094cb7406b8c65

See more details on using hashes here.

Supported by

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