Skip to main content

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


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.3.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

howdenconfig-1.0.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file howdenconfig-1.0.3.tar.gz.

File metadata

  • Download URL: howdenconfig-1.0.3.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

Hashes for howdenconfig-1.0.3.tar.gz
Algorithm Hash digest
SHA256 411601cb78efbcb9392a89cc75b6210381429a6a3ba53166156b68d7413f0b02
MD5 12404c9c877ef3f98496666f1812e3ca
BLAKE2b-256 337390a3bb396619f44e0f0673b18eee45b6d28a581296708523e638fbbf7002

See more details on using hashes here.

File details

Details for the file howdenconfig-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: howdenconfig-1.0.3-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

Hashes for howdenconfig-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8ae9eb2d0d33e8f45fecfd3be89a6a5d1718ecc8aa2b786e3f2cd69733afc81
MD5 ac1dfb77b6a3f7088539fb93391bde00
BLAKE2b-256 ba2ae8587b119a582d0b45384bac7f3cd773da44d38f98196e6fc86a0bbb8b66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page