Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ConfigFilesManager

A python module to a easy manage configs files for applications

Why?

This module help you to manage configurations files of python applications. So, you can check the value or type of a variable in configuration file, without to have write more code. You can check if a required variables is present or not. And then raise (or not) Exceptions.

Sample

For example if we have a config file like this:

[CONFIG]
# Configuration file
IP = 127.0.0.1
PORT = 27017
DB_NAME = CoreDatabase
INSTALL_PATH = /home/eamanu/dev/test_coremanagement
; timeout on milliseconds. 5000 ms = 5 seconds
TIMEOUT_DB_MS = 5000

If we want all the variables to be obligatory, we have to mark the variable like 'required'. Then, we have to say what is the type is the variable.

Our code is the next:

from configFilesManager import configFilesManager

schema = {'CONFIG': {'IP': {'type': 'str', 'required': True},
                        'TIMEOUT_DB_MS': {'type': 'int', 'required': True},
                        'PORT': {'type': 'int', 'required': True},
                        'DB_NAME': {'type': 'str', 'required': True},
                        'INSTALL_PATH': {'type': 'str', 'required': True}}}

config = 'path/to/config.ini'

cfm = configFilesManager(config, schema)
cfm.run_check()

If whole it's ok, you don't have catch any exception, but if some is bad you will have a Exception raised. You could access to the values of the configs parsed on cfm.parser_config_dict dict

Contribution

Please see CONTRIBUTE.md

Metadata

Release files for ConfigFilesManager 0.1b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ConfigFilesManager 0.1b1
File Size Uploaded Provenance Actions
ConfigFilesManager-0.1b1.tar.gz 3.4 kB Without provenance Details for ConfigFilesManager-0.1b1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ConfigFilesManager 0.1b1
File Interpreter ABI Platform Actions
ConfigFilesManager-0.1b1-py3-none-any.whl Python 3 none any Details for ConfigFilesManager-0.1b1-py3-none-any.whl

Total release size: 7.1 kB

Release files / ConfigFilesManager-0.1b1.tar.gz

Download URL ConfigFilesManager-0.1b1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1c056a22ff47468a05d40a183b3fdc0273470e9eb56417900f4714dbbb566b3c
BLAKE2b-256 checksum
How to use checksums
e5baa92e4ccdf2efff124e6291ce59cbd5f986935754ed0e39ae070e2b2d517a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.3

Release files / ConfigFilesManager-0.1b1-py3-none-any.whl

Download URL ConfigFilesManager-0.1b1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0adf8f5b6e4ff4fc1e7ef5245b93c515e62e703d853606102385ebce57c555db
BLAKE2b-256 checksum
How to use checksums
8f44bbc3e28a204e8abfba0f988a796f9994142496bd934a33991b6d443989fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.3

Security for ConfigFilesManager 0.1b1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page