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.2.tar.gz (14.5 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.2-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tyconf-1.0.2.tar.gz
  • Upload date:
  • Size: 14.5 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.2.tar.gz
Algorithm Hash digest
SHA256 6bffca534916cc4bb7442e58dab6c60339cb3939f8836a2840618c8f45c74a41
MD5 b4beac6552077665d5af17b79fcd57b9
BLAKE2b-256 6fb59582d618e42ded11d16ef99663a682c6c2a036a41893dcea0139ee42a809

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tyconf-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e825725c87e2b7be6615f7670f8334e50cd5f622d233155ea48a73b706aab71
MD5 09cdef87f19f8a13e43e50320952512e
BLAKE2b-256 64bb1274c3ef180d43597185f6f602ff4d2da50436c4791c0e17aa864e9166e4

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