Skip to main content

PyPI version Build Status codecov

DEPRECATED

This package is deprecated. pydantic provides the same featureset and much more.

Python set-ings

Load configuration from the environment for your python app. Supports typecasting and default values. Settings are made available in a way which plays nicely with IDEs and is easy to read.

Installation

  • pipenv install python-set-ings or pip install python-set-ings

Usage

# my_app/settings.py

from set_ings import Property
from set_ings import Settings as SettingsBase


Settings(SettingsBase):
    _PREFIX = 'YOUR_PREFIX'

    FOO = Property(10, cast=int)
    BAR = Property()


settings = Settings()

Then make sure you set the environment variables defined in your settings. For the example above you would have to set YOUR_PREFIX_BAR and optionally YOUR_PREFIX_FOO.

To use the settings anywhere in your app:

from my_app.settings import settings

print(settings.FOO + 2)

Contributing

Installation

  • git clone git@github.com:evocount/python-set-ings.git
  • cd python-set-ings
  • pipenv install --dev

Running tests

  • pipenv run pytest --cov

License

This project is licensed under the MIT License.

Metadata

Release files for python-set-ings 0.2.2

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

Source distribution (sdist)

Source distribution for python-set-ings 0.2.2
File Size Uploaded Provenance Actions
python-set-ings-0.2.2.tar.gz 4.5 kB Without provenance Details for python-set-ings-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-set-ings 0.2.2
File Interpreter ABI Platform Actions
python_set_ings-0.2.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for python_set_ings-0.2.2-py2.py3-none-any.whl

Total release size: 8.8 kB

Release files / python-set-ings-0.2.2.tar.gz

Download URL python-set-ings-0.2.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7a6f697b1a882311d4db94820304ecbe9681f85a89cefec830087276a0c833c0
BLAKE2b-256 checksum
How to use checksums
b428e48ea296bd424f3f58b7179d15bc70cda992e1e7c6eb07485b3b859a8f3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release files / python_set_ings-0.2.2-py2.py3-none-any.whl

Download URL python_set_ings-0.2.2-py2.py3-none-any.whl
Size 4.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
eb8a0c1d5e3b57456cfd0f1255556cf392f5dc3376fe4fba8e7ea97c7b47f58d
BLAKE2b-256 checksum
How to use checksums
3942160fcd04534f26e55c9ab032cf566e85b215d831c42860b1399d4d0436b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Security for python-set-ings 0.2.2

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.

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