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

Uploaded Source

Built Distribution

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

tyconf-0.9.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tyconf-0.9.5.tar.gz
Algorithm Hash digest
SHA256 005410b9f4e8d5fa079a7dd3e8feb1a7ba8891f475261f585c2e0dc405904cd7
MD5 667c8b4b68de674fc3f161b9031052c8
BLAKE2b-256 44571d021ba0092f957a48d2bf71285aa84cd2b34a5a313f95beaace4b81bdf2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tyconf-0.9.5-py3-none-any.whl
Algorithm Hash digest
SHA256 95e7a94f285d2b884307d4c6543a4d31956b974192e858175d4c0940f686a859
MD5 e433f7f0f790f2c8ca9e6c6c6adb9aa5
BLAKE2b-256 fc6843f73c7beb8e851aaa7bceb1b6ccfbe02674e7630f929ce0b4e8f1c5572c

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