Skip to main content

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

  1. project - a configuration dotenv loader that makes nice parameter accessors
  2. log - a logger that is pleasing to the author
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mswappinit-2025.4.14.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mswappinit-2025.4.14-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file mswappinit-2025.4.14.tar.gz.

File metadata

  • Download URL: mswappinit-2025.4.14.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.8

File hashes

Hashes for mswappinit-2025.4.14.tar.gz
Algorithm Hash digest
SHA256 9dde3ae8d6879e9e9d1add9c0024fd1cbc5e64c7033687282912994865e27e66
MD5 242c7e8337c171859daf3ac4d7ce3c51
BLAKE2b-256 84f67343edb0737b26998f0ce4afb27a04a8f8d45c0daff50ea5c83dc74c718b

See more details on using hashes here.

File details

Details for the file mswappinit-2025.4.14-py3-none-any.whl.

File metadata

File hashes

Hashes for mswappinit-2025.4.14-py3-none-any.whl
Algorithm Hash digest
SHA256 f812d26cd51dd2061b5e4712fd4f20d7061a502203f2467213fcc6e6657d160b
MD5 fcb228d2d001b492108321286f692298
BLAKE2b-256 bb39482bd68bce25f4fbb5673b7fe461dc4607799b715a03b932b5ed1dfedcd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page