Skip to main content

TyConf - Type-safe Configuration Management for Python

Project description

TyConf

TyConfTyped Config - A type-safe configuration management library for Python with runtime validation.

What is TyConf?

TyConf is a modern Python library that makes managing application configuration simple, safe, and intuitive. It provides runtime type validation, read-only properties, and freeze/unfreeze capabilities to help you build robust applications.

Quick Start

from tyconf import TyConf

# Create configuration with type-safe properties
config = TyConf(
    host=(str, "localhost"),
    port=(int, 8080),
    debug=(bool, True)
)

# Access values easily
print(config.host)      # 'localhost'
config.port = 3000      # Type-checked automatically

Key Features

Type Safety - Runtime type validation with support for Optional and Union types
Read-Only Properties - Protect critical configuration from accidental changes
Freeze/Unfreeze - Lock entire configuration to prevent modifications
Intuitive API - Both attribute (config.host) and dict-style (config['host']) access
Copy & Reset - Easily duplicate or restore default configurations
Zero Dependencies - Pure Python with no external requirements

Installation

pip install tyconf

Documentation

Examples

See the examples/ directory for complete examples:

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Links

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

tyconf-1.0.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

tyconf-1.0.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file tyconf-1.0.0.tar.gz.

File metadata

  • Download URL: tyconf-1.0.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tyconf-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c46c18e2ddf4eb2220e999df89095a1184bd3169f6388faeae542223a342de90
MD5 74686fba78824c84996866d45c01398c
BLAKE2b-256 aa9364b774d54b7b0ad97896c14f0a637156343970adf609725864607e4ded5a

See more details on using hashes here.

File details

Details for the file tyconf-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tyconf-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tyconf-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c46bb407db66b9380ea7fc426c4440148b51e1af8bc315d2ef694ce80e76b6d5
MD5 378ee2ac66da62741a35a0ac99624812
BLAKE2b-256 57931b991b404c1d6192b305c038f7a424c4e4eb245e9203e3406714c7e39e41

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