a personal, opinionated python app initializer
Project description
mswappinit
This package is expected to only be used by @mwartell for personal development projects. I've published it only after copying it into my third new project and figured an import would be easier. Others are certainly welcome to use it, but I'd be surprised.
This library provides three application bootstrap utilites
- project - a configuration dotenv loader that makes nice parameter accessors
- log - a logger that is pleasing to the author
- quickdb - a pickledb instance for quick and dirty persistence
dotenv is used to load environment variables from a file named .env
these could be something like: AWS_PROFILE=cluster and these
will all be loaded into the environment as expected.
this module provides convenience attribute access to project specificlog variables that are loaded from the dotenv file. A PROJECT_NAME must be defined and then all other variables of the form {PROJECT_NAME}_{VAR} can be accessed as attributes of the project object.
For example, if the PROJECT_NAME is "rag" and the dotenv file contains
RAG_DATA=/path/to/data then the value of project.data will be the
Path object /path/to/data.
For convenience, the values are upcast to the most likely type. For example, if the value is "true" or "false" it will be converted to a boolean. If the value is a number it will be converted to an int or float. If the value is a
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
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 mswappinit-2025.4.13.tar.gz.
File metadata
- Download URL: mswappinit-2025.4.13.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8065101412b32c02a8faa9090757805cf8abe2cdc41beaa981c7e66712f65a62
|
|
| MD5 |
469c4463d810b2dc02ef4d23cd4dd7e8
|
|
| BLAKE2b-256 |
a444e088eb2558756067ba4311e5fbfc161687950206fae5a8b6a81a4f82c810
|
File details
Details for the file mswappinit-2025.4.13-py3-none-any.whl.
File metadata
- Download URL: mswappinit-2025.4.13-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03c2b4014082ead829e6ad93e95bd998be218f6b51bad4c8ebefc8af580aede6
|
|
| MD5 |
736c4ce9e0ce56f359003a43bd3dda7c
|
|
| BLAKE2b-256 |
68b9e6227abdf6c39ca08c64d359fb4e81e6939a29ff056d41e26ddafe5a2118
|