Skip to main content

Quicksets is a lightweight settings library based on Python classes.

No dependency!

It provides inheriting settings classes. Rewrite just attributes that you really need to change:

>>> # File: `myapp.settings.develop.py`
>>> class DevelopConfig:
...     POSTGRESQL_HOST = 'localhost'
...     POSTGRESQL_PORT = 5432
...     POSTGRESQL_USERNAME = 'postgres'
...     POSTGRESQL_PASSWORD = None
...     POSTGRESQL_DATABASE = 'db'
...     POSTGRESQL_POOL_MIN_SIZE = 4
...     POSTGRESQL_POOL_MAX_SIZE = 32
...     POSTGRESQL_POOL_RECYCLE = True
...
...     @property
...     def POSTGRESQL_CONNECTION_OPTIONS(self):
...         return {
...             'user': self.POSTGRESQL_USERNAME,
...             'password': self.POSTGRESQL_PASSWORD,
...             'host': self.POSTGRESQL_HOST,
...             'port': self.POSTGRESQL_PORT,
...             'database': self.POSTGRESQL_DATABASE,
...             'minsize': self.POSTGRESQL_POOL_MIN_SIZE,
...             'maxsize': self.POSTGRESQL_POOL_MAX_SIZE,
...             'pool_recycle': self.POSTGRESQL_POOL_RECYCLE
...         }
...
>>> # File: `myapp.settings.testing.py`
>>> from myapp.settings.develop import DevelopConfig
>>>
>>> class TestingConfig(DevelopConfig):
...     POSTGRESQL_DATABASE = 'db_test'
...
>>> # File: `myapp.settings.product.py`
>>> from myapp.settings.develop import DevelopConfig
>>>
>>> class ProductConfig(DevelopConfig):
...     POSTGRESQL_HOST = '10.0.0.1'
...     POSTGRESQL_DATABASE = 'db_prod'
...     POSTGRESQL_USERNAME = 'prod_user'
...     POSTGRESQL_PASSWORD = '?????????'
...
>>> # File: `myapp.application.py`
>>> # run bash command `export SETTINGS="myapp.settings.product"`
>>> from quicksets import settings
>>>
>>> settings.POSTGRESQL_CONNECTION_OPTIONS
{'minsize': 4, 'maxsize': 32, 'host': '10.0.0.1', 'user': 'prod_user', 'database': 'db_prod', 'pool_recycle': True, 'password': '?????????', 'port': 5432}
copyright:

Copyright 2019-2020 by the Ihor Nahuliak, see AUTHORS.

license:

GNU General Public License v3 (GPLv3), see LICENSE for details.

Home-page: https://github.com/ihor-nahuliak/quicksets Author: Ihor Nahuliak Author-email: ihor.nahuliak@gmail.com License: GPL v.3.0 Description: UNKNOWN Platform: any Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Development Status :: 1 - Planning Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* Provides-Extra: dev

Release files for quicksets 0.0.1

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

Source distribution (sdist)

Source distribution for quicksets 0.0.1
File Size Uploaded
quicksets-0.0.1.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quicksets 0.0.1
File Interpreter ABI Platform
quicksets-0.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 37.3 kB

Release files / quicksets-0.0.1.tar.gz

Download URL quicksets-0.0.1.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8688e30bf5cad59e492c1c963499542f96d077ddd7aee12a6f7915c762b5cbf8
BLAKE2b-256 checksum
How to use checksums
33441fc33758e396c4865bcff07442afba3c6a1959aa6c821fbb0dd6586847bf
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.32.2 CPython/2.7.12

Release files / quicksets-0.0.1-py2.py3-none-any.whl

Download URL quicksets-0.0.1-py2.py3-none-any.whl
Size 19.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
39ba444e72735cf750275accdf3252f97a05fa69134aa3899da083361fdb183b
BLAKE2b-256 checksum
How to use checksums
a9529cf2f779f9e051b9457615616b631c6d1960fb02947d8dfd34be93a45e87
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.32.2 CPython/2.7.12

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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