A Python toolkit for managing configuration properties in a Python application
Project description
Devinci PyConfig
Devinci PyConfig is a Python toolkit for managing configuration properties in Python applications. It provides a simple way to load configuration settings from a configuration file and access them as attributes.
Installation
You can install Devinci PyConfig using pip:
pip install devinci_pyconfig
Usage
Importing
You can import the Config
class from the package:
from devinci_pyconfig import PyConfig
Initializing
To use the Config
class, you can initialize it with the path to your configuration file (optional, defaults to 'config.ini'):
config = PyConfig()
Accessing Configuration Settings
Once initialized, you can access your configuration settings as attributes of the Config
instance. For example, if your configuration file (config.ini
) contains the following:
[Database]
host = localhost
port = 5432
username = user
password = password123
You can access these settings in your Python code like this:
print(config.database_host) # Output: localhost
print(config.database_port) # Output: 5432
print(config.database_username) # Output: user
print(config.database_password) # Output: password123
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize this README with additional information or instructions specific to your package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file devinci_pyconfig-0.1.tar.gz
.
File metadata
- Download URL: devinci_pyconfig-0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6581d5dad9f7821deb4de86550bf7fda41acf5eaa7297fdeaabf96a880a3a0b8 |
|
MD5 | 35f2772c0f2967b08b3362d221e2565c |
|
BLAKE2b-256 | 6e7f70e45da56c2afb4ceb53af8b4a6ccf3faa96158deb0019d5aef710228233 |