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.1.tar.gz (11.7 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.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tyconf-1.0.1.tar.gz
  • Upload date:
  • Size: 11.7 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.1.tar.gz
Algorithm Hash digest
SHA256 127e934a04ed0a876922b71097d611d3048956cfccea44783da81bb749478748
MD5 4f167006ff3a0f2db0b513b0a8cce5ca
BLAKE2b-256 ec3095f27950ea635297dd398bbf4386e4782947e2880350fb08400740bb8344

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tyconf-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0bb3aa760c7a8c2b72aa56619330c8a0a0c41c82a34d84a86d9c2053e40322b
MD5 e368f0a448b51a90daa0912d6615b592
BLAKE2b-256 24cc5b51df58cff1bda74fc0648811c189d8719c6ccede8f92ec3ed85dffb492

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