No project description provided
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quicksets-0.0.1.tar.gz.
File metadata
- Download URL: quicksets-0.0.1.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8688e30bf5cad59e492c1c963499542f96d077ddd7aee12a6f7915c762b5cbf8
|
|
| MD5 |
947ab412bfb3ed67e33aae844dfb5266
|
|
| BLAKE2b-256 |
33441fc33758e396c4865bcff07442afba3c6a1959aa6c821fbb0dd6586847bf
|
File details
Details for the file quicksets-0.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: quicksets-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39ba444e72735cf750275accdf3252f97a05fa69134aa3899da083361fdb183b
|
|
| MD5 |
87bea141344af2bfe34513b5e1d09847
|
|
| BLAKE2b-256 |
a9529cf2f779f9e051b9457615616b631c6d1960fb02947d8dfd34be93a45e87
|