# @configu/py
Configu SDK for Python published to [PyPI](https://pypi.org/project/configu/).
## Install
```bash
pip install configu
```
## Usage
```py
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](https://oss.configu.com/py/configu.html)
## Contributing
### Requirements
- Follow the [Development](https://github.com/configu/configu/blob/main/CONTRIBUTING.md#development) section from the `CONTRIBUTING.md`.
- Install [pyenv](https://github.com/pyenv/pyenv) | [Homebrew](https://formulae.brew.sh/formula/pyenv)
- Install [poetry](https://python-poetry.org/) | [Homebrew](https://formulae.brew.sh/formula/poetry)
### Setup
Run these commands in order:
```bash
cd py
```
```bash
pyenv install
```
```bash
pyenv local 3.9.16
```
```bash
poetry env use $(pyenv which python)
```
```bash
poetry install
```
### Contribute
Follow the [Sending a Pull Request](https://github.com/configu/configu/blob/main/CONTRIBUTING.md#sending-a-pull-request) section from the `CONTRIBUTING.md`.
Raw data
{
"_id": null,
"home_page": "https://configu.com/",
"name": "configu",
"maintainer": "Ron Roditi",
"docs_url": null,
"requires_python": ">=3.9,<3.12",
"maintainer_email": "ron@configu.com",
"keywords": "cfgu,configu,configu-sdk,configu-python-sdk",
"author": "Configu",
"author_email": "info@configu.com",
"download_url": "https://files.pythonhosted.org/packages/e5/8c/32657ba1189ebb7db3be57c75a8d7dc86b7ad297bd92c8cde0cbf40757ae/configu-0.6.3.tar.gz",
"platform": null,
"description": "# @configu/py\n\nConfigu SDK for Python published to [PyPI](https://pypi.org/project/configu/).\n\n## Install\n\n```bash\npip install configu\n```\n\n## Usage\n\n```py\nimport os\n\nimport configu\n\nconfig_store = configu.InMemoryConfigStore()\ntest_set = configu.ConfigSet(\"test\")\nschema = configu.ConfigSchema(\"get-started.cfgu.json\")\n\nconfigu.UpsertCommand(\n store=config_store,\n set=test_set,\n schema=schema,\n configs={\n \"GREETING\": \"hello\",\n \"SUBJECT\": \"configu python sdk\",\n },\n).run()\n\ndata = configu.EvalCommand(\n store=config_store, set=test_set, schema=schema\n).run()\n\nconfiguration_data = configu.ExportCommand(data=data).run()\n\nprint(os.environ[\"MESSAGE\"])\n# hey, configu python sdk!\nprint(configuration_data)\n# {'GREETING': 'hey', 'SUBJECT': 'configu python sdk', 'MESSAGE': 'hey, configu python sdk!'}\n```\n\n## Reference\n\n[oss.configu.com/py](https://oss.configu.com/py/configu.html)\n\n## Contributing\n\n### Requirements\n\n- Follow the [Development](https://github.com/configu/configu/blob/main/CONTRIBUTING.md#development) section from the `CONTRIBUTING.md`.\n- Install [pyenv](https://github.com/pyenv/pyenv) | [Homebrew](https://formulae.brew.sh/formula/pyenv)\n- Install [poetry](https://python-poetry.org/) | [Homebrew](https://formulae.brew.sh/formula/poetry)\n\n### Setup\n\nRun these commands in order:\n\n```bash\ncd py\n```\n\n```bash\npyenv install\n```\n\n```bash\npyenv local 3.9.16\n```\n\n```bash\npoetry env use $(pyenv which python)\n```\n\n```bash\npoetry install\n```\n\n### Contribute\n\nFollow the [Sending a Pull Request](https://github.com/configu/configu/blob/main/CONTRIBUTING.md#sending-a-pull-request) section from the `CONTRIBUTING.md`.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Configu Python SDK",
"version": "0.6.3",
"project_urls": {
"Documentation": "https://configu.com/docs/",
"Homepage": "https://configu.com/",
"Repository": "https://github.com/configu/configu"
},
"split_keywords": [
"cfgu",
"configu",
"configu-sdk",
"configu-python-sdk"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9447b59cd4b2a80f19efda1e7bb492aaef2683dc40628df87c82c95e02aed6ae",
"md5": "5030b9ee74713326efe896b60e2c3c4f",
"sha256": "bff40cd759f4a9ea29c64e2c26be7c15c536d2ef8ae70f7859abf4cc8d8e5d41"
},
"downloads": -1,
"filename": "configu-0.6.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5030b9ee74713326efe896b60e2c3c4f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<3.12",
"size": 24097,
"upload_time": "2024-01-22T10:11:51",
"upload_time_iso_8601": "2024-01-22T10:11:51.460974Z",
"url": "https://files.pythonhosted.org/packages/94/47/b59cd4b2a80f19efda1e7bb492aaef2683dc40628df87c82c95e02aed6ae/configu-0.6.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e58c32657ba1189ebb7db3be57c75a8d7dc86b7ad297bd92c8cde0cbf40757ae",
"md5": "cf1f2f23cab4db10b79281537833710e",
"sha256": "2031d07ae022a92a25fd1e0b43edcd006d4212a81858667e65a95ad34f0aeb3a"
},
"downloads": -1,
"filename": "configu-0.6.3.tar.gz",
"has_sig": false,
"md5_digest": "cf1f2f23cab4db10b79281537833710e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<3.12",
"size": 17700,
"upload_time": "2024-01-22T10:11:53",
"upload_time_iso_8601": "2024-01-22T10:11:53.355634Z",
"url": "https://files.pythonhosted.org/packages/e5/8c/32657ba1189ebb7db3be57c75a8d7dc86b7ad297bd92c8cde0cbf40757ae/configu-0.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-22 10:11:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "configu",
"github_project": "configu",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "configu"
}