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 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 projectkit-0.2.1.tar.gz.
File metadata
- Download URL: projectkit-0.2.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/6.1.7-zen1-1-zen
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9fb761b878fe5bf228722adc61f8b41fcb42d03e592edfcc5f17242e6672ff7
|
|
| MD5 |
c556de5bb36a04838c150fa2aa44c763
|
|
| BLAKE2b-256 |
3efefe6bd9c85d9aeadaaadaeb93a49b2c2bd5ef57951fbf20eb826feaaa7f45
|
File details
Details for the file projectkit-0.2.1-py3-none-any.whl.
File metadata
- Download URL: projectkit-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/6.1.7-zen1-1-zen
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e32da9ace8480ad364919a6043b8320400b887e479668da6e45134f2b0127f11
|
|
| MD5 |
1299746e2f1d39abb3f5b544ddfe3e3a
|
|
| BLAKE2b-256 |
de2104ba4fcce04733aaf64ca2ef74bbb9178b191172ba4d2f2062ee2b499036
|