What is iubeo?
Friendlier way to write your config.
What is it good for?
You write how you want to read your config.
from iubeo import config
def list_from_string(val):
return val.split(',')
CONFIG = config(
{
'DATABASE': {
'USER': str,
'PASSWORD': str,
'HOST': str,
'PORT': str,
},
'ALLOWED_HOSTS': list_from_string,
},
# prefix = '', # default
# sep = '__', # default
)
with the above config, environment variables like
DATABASE__USER=example
DATABASE__PASSWORD=example-password
DATABASE__HOST=localhost
DATABASE__PORT=5432
ALLOWED_HOSTS=example.com,api.example.com,www.example.com
are read from the environment.
CONFIG.DATABASE.USER # "example-user"
CONFIG.DATABASE.PASSWORD # "example-password"
CONFIG.DATABASE.HOST # "localhost"
CONFIG.DATABASE.PORT # "5432"
CONFIG.ALLOWED_HOSTS # ["example.com", "api.example.com", "www.example.com"]
You can also change the separator and add a prefix to manage your environment variables better
CONFIG = config({
'SECRETS': {
'API_KEY': str,
},
}, prefix='APP1', sep='-')
which would be read from
APP1-SECRETS-API_KEY=isik_kaplan_api_key
Iubeo also comes with a couple of pre-configured functions to read common environment variable types:
from iubeo import config, comma_separated_list, boolean
CONFIG = config({
'DATABASE': {
'USER': str,
'PASSWORD': str,
'HOST': str,
'PORT': str,
},
'ALLOWED_HOSTS': comma_separated_list,
'DEBUG': boolean,
})
Metadata
Release files for iubeo 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| iubeo-0.4.1.tar.gz | 4.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iubeo-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / iubeo-0.4.1.tar.gz
| Download URL | iubeo-0.4.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb3418d2445d449a0a8afa50ecc642120b93794d7e65fbf3dc006053318a4986
|
|
BLAKE2b-256 checksum How to use checksums |
dc5f60204f1d29120c3b61d73efa1dd39079975e37303c5389c373a0c08146b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / iubeo-0.4.1-py3-none-any.whl
| Download URL | iubeo-0.4.1-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a1e97eb6cdd96119f3fc867dc7aeaa507ece1d8d29dd3b20a8b9dce756325e2
|
|
BLAKE2b-256 checksum How to use checksums |
780f7b9a392f67f3c657ab3707f89c64807693ad5a9037122ff0630db82abd8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for iubeo 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.