python-environment-settings
简易的配置项获取方式,支持添加多种配置项获取源。默认从环境变量中获取配置项。
安装
pip install python-environment-settings
使用
from django.conf import settings
import python_environment_settings
python_environment_settings.add_settings(settings)
CONFIG1 = python_environment_settings.get(
"CONFIG1",
default="DEFAULT_VALUE1",
aliases=[
"config1",
"item1",
"key1",
]
)
版本记录
v0.1.0
- 版本首发。
v0.1.1
- 允许添加优先级高于env的settings。
Metadata
Release files for python-environment-settings 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-environment-settings-0.1.1.tar.gz | 6.8 kB | Without provenance | Details for python-environment-settings-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_environment_settings-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for python_environment_settings-0.1.1-py3-none-any.whl |
Total release size: 13.6 kB
Release files / python-environment-settings-0.1.1.tar.gz
| Download URL | python-environment-settings-0.1.1.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
caccc845eea073e42e7a6548edde84225c91edb11252d848a9abd4f5b28d9693
|
|
BLAKE2b-256 checksum How to use checksums |
5a8e557c7b30791aae9e41bccd942c169c4027a1f13ae0474ab01bc8b3a8bec2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.9
|
Release files / python_environment_settings-0.1.1-py3-none-any.whl
| Download URL | python_environment_settings-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23872d246864f5ff669d30faef72e0567572d3abb1f5e58292e597e015038df8
|
|
BLAKE2b-256 checksum How to use checksums |
1a5909448f5d8c73e97d8cc6bb2543afd78743d2711754307833f03c3aa0b1c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.9
|
Security for python-environment-settings 0.1.1
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.