Multi-level configuration framework
Project description
Conftier
A powerful multi-tier configuration management framework that simplifies the definition, access, and synchronization of layered configurations in Python applications.
Think of VSCode's configuration system: you have user settings that apply globally and workspace settings that override them for specific projects. Conftier brings this same intuitive model to your Python frameworks and applications.
Documentation
For comprehensive guides, examples, and API reference, visit our documentation:
Overview
Conftier helps you manage configurations across multiple levels:
- User-level settings: Global preferences that apply across all projects (~/.zeeland/{config_name}/config.yaml)
- Project-level settings: Local configurations specific to a project (./.{config_name}/config.yaml)
- Default values: Fallback values defined in your configuration schema
Conftier automatically merges these configurations based on priority (project > user > default).
Key Features
- Multi-level Configuration Management: Like VSCode's user/workspace settings pattern
- Flexible Schema Definition: Use Pydantic models or dataclasses to define and validate configurations
- Type Safety: No more string/int confusion or missing required fields
- Smart Merging: Only override what's specified, preserving other values
- CLI Integration: Built-in command-line tools for configuration management
- IDE Autocompletion: Full type hints for a great developer experience
Why Conftier?
| Without Conftier | With Conftier |
|---|---|
| Manual parsing of multiple config files | Automatic loading and merging |
| Type errors discovered at runtime | Validation at load time |
| Custom code for merging configs | Smart merging built-in |
| Documentation struggles | Schema serves as documentation |
| Repetitive boilerplate | Consistent, reusable pattern |
Installation
# Basic installation
pip install conftier
# With Pydantic support (recommended)
pip install conftier[pydantic]
Quick Example
from pydantic import BaseModel, Field
from conftier import ConfigManager
class AppConfig(BaseModel):
app_name: str = "MyApp"
debug: bool = False
config_manager = ConfigManager(
config_name="myapp",
config_schema=AppConfig,
auto_create=True
)
# Load the merged configuration
config: AppConfig = config_manager.load()
When to Use Conftier
Conftier shines when:
- You're building a framework or library: Give your users a consistent way to configure your tool
- Your app has both user and project settings: Like VSCode's personal vs. project-specific settings
- You need schema validation: Ensure configuration values have the correct types and valid ranges
- You want to reduce boilerplate: Stop writing the same configuration loading code in every project
🛡 License
This project is licensed under the terms of the MIT license.
See LICENSE for more details.
🤝 Support
For more information, please contact: zeeland4work@gmail.com
Credits 
This project was generated with P3G
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file conftier-0.2.1.tar.gz.
File metadata
- Download URL: conftier-0.2.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.9.22 Linux/6.11.0-1014-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d81344dc1e21c6948dd2a96d792c48acb74531a05bda6b2c99bf68f02eca51de
|
|
| MD5 |
ea57980127990b8a28cd14dfa49a4cb7
|
|
| BLAKE2b-256 |
6f18b453340f6373ae8f4e90e825976c822651715c1eea016ec1f26a39eaaaec
|
File details
Details for the file conftier-0.2.1-py3-none-any.whl.
File metadata
- Download URL: conftier-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.9.22 Linux/6.11.0-1014-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a856fd89c717835901a40dc78ab865f3f6b440030b02543372098add24a2f8e
|
|
| MD5 |
2c7b4979feb290f28753bca6e8c88525
|
|
| BLAKE2b-256 |
212a76f7b9d3d39bc0db61facc6045f46fb2affa40a126b6cde1b36480a517ca
|