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
Contributing
Requirements
- Follow the Development section from the
CONTRIBUTING.md
. - Install pyenv | Homebrew
- Install poetry | Homebrew
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
Release history Release notifications | RSS feed
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 details)
Built Distribution
configu-0.6.3-py3-none-any.whl
(24.1 kB
view details)
File details
Details for the file configu-0.6.3.tar.gz
.
File metadata
- Download URL: configu-0.6.3.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.9.16 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2031d07ae022a92a25fd1e0b43edcd006d4212a81858667e65a95ad34f0aeb3a |
|
MD5 | cf1f2f23cab4db10b79281537833710e |
|
BLAKE2b-256 | e58c32657ba1189ebb7db3be57c75a8d7dc86b7ad297bd92c8cde0cbf40757ae |
File details
Details for the file configu-0.6.3-py3-none-any.whl
.
File metadata
- Download URL: configu-0.6.3-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.9.16 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bff40cd759f4a9ea29c64e2c26be7c15c536d2ef8ae70f7859abf4cc8d8e5d41 |
|
MD5 | 5030b9ee74713326efe896b60e2c3c4f |
|
BLAKE2b-256 | 9447b59cd4b2a80f19efda1e7bb492aaef2683dc40628df87c82c95e02aed6ae |