A simple configuration manager with Pydantic and JSON export.
Project description
.\build.ps1
from pydantic import BaseModel
from HowdenConfig.config import Config
class Model1(BaseModel):
provider_and_model: str = "openai:"
path: str = "hest"
class Model2(BaseModel):
provider_and_model: str = "llamaparser:"
path: str = "hest2"
class Parameter(Config):
pdf_path: str = "hest/b.json"
split: bool = True
llama_premium_mode: bool = True
model1: Model1 = Model1()
model2: Model2 = Model2()
if __name__ == "__main__":
parameter = Parameter()
print(parameter.split)
print(parameter.pdf_path)
print(parameter.model1.provider_and_model)
parameter.write_to_json_file("hest.json")
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
howdenconfig-1.0.6.tar.gz
(2.4 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 howdenconfig-1.0.6.tar.gz.
File metadata
- Download URL: howdenconfig-1.0.6.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1196dac939b2c443b3d04fc0fa42078d88c2ddf92c755968511a81606646cd7b
|
|
| MD5 |
1ee9c26462ddddbb98c089bd11eb2031
|
|
| BLAKE2b-256 |
cf1eebd5697622eec2fb91818ed226bbbc082e5ab7626b91f07bb7001fbae60a
|
File details
Details for the file howdenconfig-1.0.6-py3-none-any.whl.
File metadata
- Download URL: howdenconfig-1.0.6-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81d33d66cec0c6f3fce134a9417552a5789a78a9b15961e54330da55ba26baf
|
|
| MD5 |
1bc5e653ff74654b32602c80e1b4a4db
|
|
| BLAKE2b-256 |
9b9fe18670ce43b538c8ca2f7273830de4dddbb61e056321c7678fe5ce26f961
|