Name | projectkit JSON |
Version |
0.2.1
JSON |
| download |
home_page | |
Summary | |
upload_time | 2023-01-23 14:26:49 |
maintainer | |
docs_url | None |
author | caniko |
requires_python | >=3.8,<4.0 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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`
```python
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`:
```toml
leader_age = 96
[participants]
name = "age"
```
2. The settings lock file, `project_kit_demo.lock.toml`:
```toml
Python_version = "3.10.9"
[ProjectKit]
format = "toml"
version = "0.1.0"
[Locked]
leader_age = 96
[Locked.participants]
name = "age"
```
## Installation
```shell
pip install projectkit
```
For those that prefer poetry:
```shell
poetry add projectkit
```
Raw data
{
"_id": null,
"home_page": "",
"name": "projectkit",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "caniko",
"author_email": "canhtart@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3e/fe/fe6bd9c85d9aeadaaadaeb93a49b2c2bd5ef57951fbf20eb826feaaa7f45/projectkit-0.2.1.tar.gz",
"platform": null,
"description": "# ProjectKit: File-based settings utility\n\nSupporting both YAML and TOML, your projects will have a user-friendly settings file. Native support for `Pydantic.model` in addition to Python `class`.\n\n## Usage\nThe following generates two new files; `project_kit_demo.toml` and `project_kit_demo.lock.toml`\n```python\nfrom projectkit.model.settings import ProjectKitSettings\n\nmy_settings = ProjectKitSettings(project_name=\"showing_off\", manual_setting_to_default={\"leader_age\": 96})\n\nwild_user_input = int(input(\"How many participants? \"))\nnumber_of_participants = {\n \"participants\": [{\"name\": \"\", \"age\": 0} for _ in range(wild_user_input)]\n}\nmy_settings.dump_new(project_directory=\".\", additional_settings=number_of_participants)\n```\n\n### Output\n1. The settings file, `project_kit_demo.toml`:\n```toml\nleader_age = 96\n\n[participants]\nname = \"age\"\n```\n2. The settings lock file, `project_kit_demo.lock.toml`:\n```toml\nPython_version = \"3.10.9\"\n\n[ProjectKit]\nformat = \"toml\"\nversion = \"0.1.0\"\n\n[Locked]\nleader_age = 96\n\n[Locked.participants]\nname = \"age\" \n```\n\n## Installation\n```shell\npip install projectkit\n```\nFor those that prefer poetry:\n```shell\npoetry add projectkit\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "0.2.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "de2104ba4fcce04733aaf64ca2ef74bbb9178b191172ba4d2f2062ee2b499036",
"md5": "1299746e2f1d39abb3f5b544ddfe3e3a",
"sha256": "e32da9ace8480ad364919a6043b8320400b887e479668da6e45134f2b0127f11"
},
"downloads": -1,
"filename": "projectkit-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1299746e2f1d39abb3f5b544ddfe3e3a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 8349,
"upload_time": "2023-01-23T14:26:47",
"upload_time_iso_8601": "2023-01-23T14:26:47.395254Z",
"url": "https://files.pythonhosted.org/packages/de/21/04ba4fcce04733aaf64ca2ef74bbb9178b191172ba4d2f2062ee2b499036/projectkit-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3efefe6bd9c85d9aeadaaadaeb93a49b2c2bd5ef57951fbf20eb826feaaa7f45",
"md5": "c556de5bb36a04838c150fa2aa44c763",
"sha256": "d9fb761b878fe5bf228722adc61f8b41fcb42d03e592edfcc5f17242e6672ff7"
},
"downloads": -1,
"filename": "projectkit-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "c556de5bb36a04838c150fa2aa44c763",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 7041,
"upload_time": "2023-01-23T14:26:49",
"upload_time_iso_8601": "2023-01-23T14:26:49.095259Z",
"url": "https://files.pythonhosted.org/packages/3e/fe/fe6bd9c85d9aeadaaadaeb93a49b2c2bd5ef57951fbf20eb826feaaa7f45/projectkit-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-23 14:26:49",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "projectkit"
}