Description
Utility that allows to read and parse json config files.
Possible to specify links to the default values in the config (See Usage section).
Installation
Install python 3.6+
Ensure pip, setuptools, and wheel are installed and up to date
python -m pip install --upgrade pip setuptools wheel
Create virtual enviroment (make sure that is not part of the project)
python -m venv <ENV NAME>
or
python -m venv %path%\to\<ENV NAME>
Active virtual enviroment
%path%\to\<ENV NAME>\Script\activate
Install all project dependencies if needed
pip install -r requirements.txt
Install pandoc and pypandoc. Instruction
pip install pypandoc
Usage
Example of the config file:
C:\User\test\qa_hotfix_config.json
{
"defaults": {
"dataBaseUrl": "http://db:5000"
},
"dataBase1": "<defaults.dataBaseUrl>",
"dataBase2": "<defaults.dataBaseUrl>"
}
Specify that lib in your project dependencies
Import from jsonconfigparser.json_config_reader import JsonConfigReader
Create an instance of the class passing config folder path and options
config_path = 'C:\User\test\qa_config.json' json_config_reader = JsonConfigReader(config_path) config = json_config_reader.get() file_path = json_config_reader.get_config_file_path() print(config['dataBase1']) print(file_path) >> http://db:5000 >> C:\User\test\qa_config.json
Uploading project to PyPi
Change version in setup.py
Upload changes to PyPi server
python setup.py sdist upload -r <Repository URL to the PyPi server>
Run unit tests (Example for Visual Studio)
From Visual Studio
Click Test -> Run -> All Test
View Test run in Test Explorer
From CLI
Navigate into project directory
python -m unittest
Generate docs and updating docs
Run easy_install -U sphinx
Navigate to docs folder
Run sphinx-quickstart
Metadata
Release files for jsonconfigreader 1.3.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 |
|---|---|---|---|---|
| jsonconfigreader-1.3.1.tar.gz | 4.1 kB | Without provenance | Details for jsonconfigreader-1.3.1.tar.gz |
Release files / jsonconfigreader-1.3.1.tar.gz
| Download URL | jsonconfigreader-1.3.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e1825f26e6b5394123827fa6356007daff1dac035bc1f35c9031ce50507d726
|
|
BLAKE2b-256 checksum How to use checksums |
554005f563b81cdab6b9b44f4e062c30b9848d6c5d9e45ded02025d8e4f9a033
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jsonconfigreader 1.3.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.