Skip to main content

Configu Python SDK

Project description

@configu/py

Configu SDK for Python published to PyPI.

Install

pip install configu

Usage

import os

import configu

config_store = configu.InMemoryConfigStore()
test_set = configu.ConfigSet("test")
schema = configu.ConfigSchema("get-started.cfgu.json")

configu.UpsertCommand(
  store=config_store,
  set=test_set,
  schema=schema,
  configs={
    "GREETING": "hello",
    "SUBJECT": "configu python sdk",
  },
).run()

data = configu.EvalCommand(
  store=config_store, set=test_set, schema=schema
).run()

configuration_data = configu.ExportCommand(data=data).run()

print(os.environ["MESSAGE"])
# hey, configu python sdk!
print(configuration_data)
# {'GREETING': 'hey', 'SUBJECT': 'configu python sdk', 'MESSAGE': 'hey, configu python sdk!'}

Reference

oss.configu.com/py

Contributing

Requirements

Setup

Run these commands in order:

cd py
pyenv install
pyenv local 3.9.16
poetry env use $(pyenv which python)
poetry install

Contribute

Follow the Sending a Pull Request section from the CONTRIBUTING.md.

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

configu-0.6.3.tar.gz (17.7 kB view hashes)

Uploaded Source

Built Distribution

configu-0.6.3-py3-none-any.whl (24.1 kB view hashes)

Uploaded Python 3

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