Skip to main content

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

  1. The settings file, project_kit_demo.toml:
leader_age = 96

[participants]
name = "age"
  1. 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

Metadata

Release files for projectkit 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for projectkit 0.2.1
File Size Uploaded
projectkit-0.2.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for projectkit 0.2.1
File Interpreter ABI Platform
projectkit-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / projectkit-0.2.1.tar.gz

Download URL projectkit-0.2.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d9fb761b878fe5bf228722adc61f8b41fcb42d03e592edfcc5f17242e6672ff7
BLAKE2b-256 checksum
How to use checksums
3efefe6bd9c85d9aeadaaadaeb93a49b2c2bd5ef57951fbf20eb826feaaa7f45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.9 Linux/6.1.7-zen1-1-zen

Release files / projectkit-0.2.1-py3-none-any.whl

Download URL projectkit-0.2.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e32da9ace8480ad364919a6043b8320400b887e479668da6e45134f2b0127f11
BLAKE2b-256 checksum
How to use checksums
de2104ba4fcce04733aaf64ca2ef74bbb9178b191172ba4d2f2062ee2b499036
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.9 Linux/6.1.7-zen1-1-zen

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page