globconf
Creates a global configparser object, regardless of the project and module in need of it
Getting Started
In project:
from globconf import config
# config will attempt to read local config.ini file if present - otherwise:
if 'important section' not in config.sections():
config.read_string("""
[important section]
host = critical-system.com
user = REST_USER
pwd = REST_PASSWORD
verify_ssl = false
""")
# or config.read('some_other_config.ini')
# load class using globconf.config
In modules:
from globconf import config, verify_required_options
class module(object):
def __init__(self):
sec = 'service now'
self.cfg = verify_required_options(sec, ['host', 'user', 'pwd'])
if not self.cfg.getboolean('verify_ssl', fallback=True):
import urllib3
urllib3.disable_warnings(InsecureRequestWarning)
And your module is happy as long as someone has initialised the needed section in the global config.
Prerequisites
configparser
Installing
A step by step series of examples that tell you how to get a development env running
Give the example
And repeat
until finished
End with an example of getting some data out of the system or using it for a little demo
package
python setup.py sdist
test
pytest
or
pyton -m unittest
Authors
- Steffen Schumacher - Initial work - steffenschumacher
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- Hat tip to anyone whose code was used
- Inspiration
- etc
Metadata
Release files for klang-globconf 0.0.6
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 |
|---|---|---|---|---|
| klang-globconf-0.0.6.tar.gz | 2.7 kB | Without provenance | Details for klang-globconf-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| klang_globconf-0.0.6-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for klang_globconf-0.0.6-py2.py3-none-any.whl |
Total release size: 6.8 kB
Release files / klang-globconf-0.0.6.tar.gz
| Download URL | klang-globconf-0.0.6.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1df9e074ef2cb46f300d32a4737e093c0746c30174a6493c2aef5767d6e6791c
|
|
BLAKE2b-256 checksum How to use checksums |
239a83aa7732114a0d7e4fb21e2f54cef0d77b696e8878df2dfa5ba44679d6c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
|
Release files / klang_globconf-0.0.6-py2.py3-none-any.whl
| Download URL | klang_globconf-0.0.6-py2.py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fa8c3a7bdb5db32ee49bdec833978f383f05fa054c4fb7a6bd1436e59819df1e
|
|
BLAKE2b-256 checksum How to use checksums |
bdbca839a11a7e30649c329ba070821cc926f18fea156ec2f2bc4ce242858b16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
|
Security for klang-globconf 0.0.6
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.