Create generic any easy way to manage Configs for your project
Project description
pip install cornflakes
pip install git+https://github.com/semmjon/cornflakes
Information
This package was created by starting C ++ methods to incorporate into my python implementations. To make things easier for me, lightweight public libraries were included (especially to carry out string operations):
hash-library
strtk
rapidjson
Features:
- The following features have currently been implemented:
- config management system
based on dataclass
alternative Implementation for pydantic (BaseSettings)
ini support files by a lightweight and fast parser (-> ini_load)
yaml support (based on PyYAML)
environment variables
(future) support json (based on orjson)
- command line interface management
method: click_cli (decorator)
based on click and rich
easy to use and start with
- eval_type
method to parse strings in python-types e.g. int | bool | timestamp
- simple_hmac
vectorized c++ hmac implementation
- default_ca_path
python function to find a default ssl / ca certificate path
Currently, the package is tested for Linux, Mac and Windows
Development
Prerequisites
A compiler with C++17 support
Pip 10+ or CMake >= 3.4 (or 3.8+ on Windows, which was the first version to support VS 2015)
Python 3.8+
doxygen
cppcheck
clang-tools-extra or clang-tidy
Commands
Just clone this repository and pip install. Note the --recursive option which is needed for the pybind11 submodule:
git clone --recursive https://gitlab.blubblub.tech/sgeist/cornflakes.git
Install the package using makefiles:
make install
Build dist using makefiles:
make dist
Run tests (pytest) using makefiles:
make test
Run all tests using makefiles:
make test-all
Run lint using makefiles:
make lint
Create dev venv:
python -m venv .venv
source .venv/bin/activate
pip install cookietemple ninja pre-commit poetry
Bump Version using cookietemple:
cookietemple bump-version "<version(e.g 0.0.1)>"
Run lint using cookietemple:
cookietemple lint .
Install pre-commit:
pre-commit install
Update pre-commit:
pre-commit update -a
Run pre-commit:
pre-commit run -a
Publish
Its not recommended publish manually (use git-ci or github workflows instead).
make publish
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 Distributions
Hashes for cornflakes-3.0.9-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ee76163b36e356e5865180232cea1601072a9aaf871f4f7cc59a55fb414d498 |
|
MD5 | 5318c44e9b5eb66151ed7cdf3e43db73 |
|
BLAKE2b-256 | 59348d0a9da905b9ea5e6019d9b7d8cd1799d49e02c2f01754b5d55491144ea1 |
Hashes for cornflakes-3.0.9-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4a7d3c84435b8ea535ca47ece0603ea06c6614832104aced17ee617c9c1dbb9 |
|
MD5 | ed298fb6dcfbc75f1f86d2a2dfe97039 |
|
BLAKE2b-256 | a4ab6e228b73747a86a612f9f3ad1daa579066389f371e043faa7ea778698a31 |
Hashes for cornflakes-3.0.9-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8342d4953a27e87af4180ceb988aac706c153eb33b255fc251ce2f071630c351 |
|
MD5 | 08464d05e0a06a92d6f642287156995a |
|
BLAKE2b-256 | 51e135ef1ed49e9340297d21d35d78691a30ff450d7a53eb8f2a39d3a4f20f29 |
Hashes for cornflakes-3.0.9-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b67bfe5c5800f59f9c852aa25679ad25f0976196d0c3f272601dbcad1772b23 |
|
MD5 | b4b5b0b0c11616d7f8ab1b433a0b2d6f |
|
BLAKE2b-256 | 95adf2508199eb1a25271c2abb8895fa474e13831cd16ac380382800072e191d |
Hashes for cornflakes-3.0.9-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec3eca422bcc13440eed0d64a1eed23cb078ae3b0817af991a1fff6f2e15aaa0 |
|
MD5 | 1c4da385c6dae5e175a504a7020d62ce |
|
BLAKE2b-256 | f6eae0b2bd41d840021ce801f17dee18bae4ffc0b2e0645e00a0d3cc489c7442 |
Hashes for cornflakes-3.0.9-cp310-cp310-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12f67f82dac7724a48fcb149ddc17c83cc9af1aaec55c98c4f2f3b4adea9df1c |
|
MD5 | e7b392c4cb96b7ac57beb8d8a3fa061c |
|
BLAKE2b-256 | 7596800eec0d7fc1d0ef5944b509d4005dad97bf63f48dbf8f3796f1984991df |
Hashes for cornflakes-3.0.9-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dddefdbe4b8e53320fb6c0a3643925fed9b4f30c67e91ccf3ef45ce983cf8d2 |
|
MD5 | 0c026fcce91bdea31c1ee4132027dd1d |
|
BLAKE2b-256 | b44b975be905d3c113541499df018afb0c6f0e5d2556a7893591d505766ab9e8 |
Hashes for cornflakes-3.0.9-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 322464c8b2f86e87c7e71739cac6db066695652496eca0f6649aef6715b2625d |
|
MD5 | 76980be9a78522e01671790ea2c1cd73 |
|
BLAKE2b-256 | 1269d229f738652baa7a247b4e8501b256f83b779589473979f0fe207b3fc605 |
Hashes for cornflakes-3.0.9-cp39-cp39-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93ea43b7904ee32537e5623497a2d0b0cb02dd73ed38980c84ee87e3981780e1 |
|
MD5 | d05734ca6e8013def034c2a8e2a5aeca |
|
BLAKE2b-256 | 899eb38bcf80defb38107aff7e3eb3eaa9a4a734cc9306de44c3adff46fdfb7a |
Hashes for cornflakes-3.0.9-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eac0259649a06b92891d029cff9f1b332025eae9dc01939d13f37a6c90925e7b |
|
MD5 | c364961bcac62ed3fe2ee01f79ce2fba |
|
BLAKE2b-256 | a4c5704ec7117c9dfef14fca0b4bd1110cf3bfe328f7f57460ded61b1c154297 |
Hashes for cornflakes-3.0.9-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 637f5d3b7f0aa24e263cc3d0c6074ecf3507f881b05bc9b37487d1ab5a98b98c |
|
MD5 | cf0bc4391cd063927cea4708f7097edd |
|
BLAKE2b-256 | 68ae5b994e0c068c5338ef8f119d5f77d91869d3f2f5618d3624724753e538ce |
Hashes for cornflakes-3.0.9-cp38-cp38-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6665b9c1bcf33da10c3515e24b3bba4900623047a9052832dd1a19d98fb9981a |
|
MD5 | fc05bc8f595eb2c12c9f41a78b842ba1 |
|
BLAKE2b-256 | 874d8fef3438ef6f4003dd95e24fbec5a645e6781bc22c3c2ea403e77eaf5955 |