Skip to main content

Package to manage configuration for you project.

Project description

Polidoro Config

Polidoro Config it is a configuration manager for you project

Code Quality CodeQL Upload Python Package Documentation Status
Latest Version GitHub Release Date
GitHub commits since latest release (by SemVer including pre-releases) GitHub last commit
GitHub issues GitHub pull requests

Coverage Quality Gate Status Security Rating Maintainability Rating Reliability Rating
Code Smells Duplicated Lines (%) Vulnerabilities Bugs Technical Debt
DeepSource
PyPI

Python Versions
GitHub branch check runs
GitHub branch check runs
GitHub branch check runs

Basic Usage

Create a class inheriting from ConfigBase

from pconfig import ConfigBase

class Config(ConfigBase):
	DB_HOST = 'localhost'
	ENVIRONMENT = 'development'
	...

When the class is instantiated will load from environment variables.

# script.py
from pconfig import ConfigBase

class Config(ConfigBase):
	MY_VAR = 'default_value'

print(Config.MY_VAR)
>>> python script.py
default_value

>>> MY_VAR="new_value" python script.py
new_value

If you have the python-dotenv installed will load the .env automatically. Also, you can load from a .yaml file setting the file path in the Config class:

# script.py
from pconfig import ConfigBase

class Config(ConfigBase):
	file_path = "my_config.yml"
	MY_VAR = 'default_value'

For more information see the Documentation

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

polidoro_config-1.0.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

polidoro_config-1.0.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file polidoro_config-1.0.1.tar.gz.

File metadata

  • Download URL: polidoro_config-1.0.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for polidoro_config-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d0f4bdaa289128efc7a30279abf0d9aa43fbbfc68aa00a6493152dd2d3b5cfc6
MD5 68126b7dad3988e5f624a3cb7e2a2fbb
BLAKE2b-256 5fb39d6b0d548a224dce73029124e0b5fa99c9a99529d78b8df7bee250f030ba

See more details on using hashes here.

File details

Details for the file polidoro_config-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for polidoro_config-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12e25e836f9e6a50a950fface9b24f91fcca3b9f423c42680a96c661eb7207e4
MD5 3d39e8b6f5ff2f722f151b8e86e9b95d
BLAKE2b-256 1663ee7e1796c635241be87e57384cc3c6f3f9fa976de298d19a2d1274bf37f2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page