No project description provided
Project description
ProjectKit: File-based settings utility
Supporting both YAML and TOML, your projects will have a user-friendly settings file. Native support for Pydantic.model
in addition to Python class
.
Usage
The following generates two new files; project_kit_demo.toml
and project_kit_demo.lock.toml
from projectkit.model.settings import ProjectKitSettings
my_settings = ProjectKitSettings(project_name="showing_off", manual_setting_to_default={"leader_age": 96})
wild_user_input = int(input("How many participants? "))
number_of_participants = {
"participants": [{"name": "", "age": 0} for _ in range(wild_user_input)]
}
my_settings.dump_new(project_directory=".", additional_settings=number_of_participants)
Output
- The settings file,
project_kit_demo.toml
:
leader_age = 96
[participants]
name = "age"
- The settings lock file,
project_kit_demo.lock.toml
:
Python_version = "3.10.9"
[ProjectKit]
format = "toml"
version = "0.1.0"
[Locked]
leader_age = 96
[Locked.participants]
name = "age"
Installation
pip install projectkit
For those that prefer poetry:
poetry add projectkit
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
projectkit-0.2.1.tar.gz
(7.0 kB
view hashes)
Built Distribution
Close
Hashes for projectkit-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e32da9ace8480ad364919a6043b8320400b887e479668da6e45134f2b0127f11 |
|
MD5 | 1299746e2f1d39abb3f5b544ddfe3e3a |
|
BLAKE2b-256 | de2104ba4fcce04733aaf64ca2ef74bbb9178b191172ba4d2f2062ee2b499036 |