Environment variable helpers
Project description
Roskarl
Is a tiny module for environment variables.
Requires
Python 3.9.5
How to install
pip install roskarl
Example usage
from roskarl.env import (
env_var_bool,
env_var_cron,
env_var_float,
env_var_int,
env_var_list,
env_var,
env_var_tz,
env_var_dsn,
DSN
)
str
value = env_var(name="STR_VAR")
returns str
bool
value = env_var_bool(name="BOOL_VAR")
tz
value = env_var_tz(name="TZ_VAR")
list
value = env_var_list(name="LIST_VAR", separator="|")
returns list if value is splittable by separator
int
value = env_var_int(name="INT_VAR")
returns int if value is numeric
float
value = env_var_float(name="INT_VAR")
returns float if value is float
cron
value = env_var_cron(name="CRON_EXPRESSION_VAR")
DSN
value = env_var_dsn(name="DSN_VAR", type)
returns DSN object if value is like a dsn
needs to be formatted like this:
postgresql://username:password@hostname:5432/database_name
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
roskarl-2.3.3.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file roskarl-2.3.3.tar.gz.
File metadata
- Download URL: roskarl-2.3.3.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f38b64f273dac546f3c33c2264349e6f58c42355e4a39458850e643431f1e033
|
|
| MD5 |
94661a3e13281b611b59367882ff8ee5
|
|
| BLAKE2b-256 |
8fde5e3b9db320ad6be295770e97946cd5a7bad2060346a57745cdd167aeadcb
|
File details
Details for the file roskarl-2.3.3-py3-none-any.whl.
File metadata
- Download URL: roskarl-2.3.3-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e5ad35b129d4ecd8afd6568b5b4097c526040cb0a555b3bba70d8f868a9f882
|
|
| MD5 |
1c3c2bf52398b33527fd38dabbd21c5a
|
|
| BLAKE2b-256 |
bdbe6b8b1dc9e7100fa145f28a3bcc4d79dd1fc734db0b9e35db1e1c8fe3cede
|