Environment variable helpers
Project description
Roskarl
Is a tiny module for environment variables.
Requires
Python 3.13.0
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.2.0.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.2.0.tar.gz.
File metadata
- Download URL: roskarl-2.2.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42a4f23cb4aee833fc9453047d8bade5a8cded70c8c022c626f872161a211878
|
|
| MD5 |
cb0472ef68c602a0676f1fc41737dcaa
|
|
| BLAKE2b-256 |
b8edfd1f7fa9a62aa66cd4e28c59931d11d4e1522927f00e05c44bc67e467352
|
File details
Details for the file roskarl-2.2.0-py3-none-any.whl.
File metadata
- Download URL: roskarl-2.2.0-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.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
840ac664f5117b7349af01273a2c6d60703921c55e9cf27f578cc5e56b856534
|
|
| MD5 |
9d6e3e8df0230ab2ad71107f31e79fcb
|
|
| BLAKE2b-256 |
947ddcc671c98734bf24a34f34b3c289e00f88a969d21d80a9d9d6028b3653b5
|