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.1.tar.gz
(4.4 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.1.tar.gz.
File metadata
- Download URL: roskarl-2.3.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a89a8f1f835c6dae452a16856a152f05ed3b8876dc4b6cd91620287edd80058
|
|
| MD5 |
77df0d299c66d965273efde270ba3065
|
|
| BLAKE2b-256 |
d38acdc146fb0dcf3979ad5b3a4aac05f7133e7b9759f3981adc112162e28f4f
|
File details
Details for the file roskarl-2.3.1-py3-none-any.whl.
File metadata
- Download URL: roskarl-2.3.1-py3-none-any.whl
- Upload date:
- Size: 4.2 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 |
63d2e3bf75e47cc449e460a2f100ff06786c3231727393f6fad1f55a7e7d4a60
|
|
| MD5 |
aa76c121dcc7a704b1f3b36ba63bc83f
|
|
| BLAKE2b-256 |
c796ec7a62acfec6487d2f3e70fb50cc09820fcce3d8d7668ee206b6ae70773d
|