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.1.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08a7c5d29323de1d62a4796dcadd6822c0d72bea20f5f0b4ad73f616569a4b7d |
|
MD5 | b9a652eabcf25bce442e55df467ad3c1 |
|
BLAKE2b-256 | a224ce629837aa652901491f5e169e16385da6d11acaa4b5750c67352b12ee96 |
Hashes for cornflakes-3.1.0-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d510caa6be7a675ad62b0e86854d3f1db3e005b6985bf93a5f4cd9ea4b1d1e4b |
|
MD5 | cf6b60ab247fbd54153d5c2191448ef4 |
|
BLAKE2b-256 | b9adce5799ee21ecb45f153c14515127b44e7832f8131fea41d92e45e6012b66 |
Hashes for cornflakes-3.1.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 193cdcea807f6c70a761151128439d59acca95a0648f273c3548cb08ec49d9f7 |
|
MD5 | 500ca326861345ea1474686e68adc06f |
|
BLAKE2b-256 | bbd4ad59ea2be86714a511a3dd7c2c4c1b067b48ad4c39914e4145311b231fa5 |
Hashes for cornflakes-3.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9ad3261d81645fa56e3a349c52a7f86def4b70ce595669c64075fc8539e2791 |
|
MD5 | 52623a984512b5c420cdb602278d75e9 |
|
BLAKE2b-256 | 70963935a3dea1b7f0e567213e16ca6d53bde12c08ffe5ccdef135869b473ef5 |
Hashes for cornflakes-3.1.0-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a83e060a72db4c60defabfee764661846484333899d2d06564b363ddfce0ab24 |
|
MD5 | b8f062255f0da36591fff9a98b99f60d |
|
BLAKE2b-256 | 73ce77d08222c87aa7d84656c979f1eb91d622e2ffd3c275efd832a113bb5382 |
Hashes for cornflakes-3.1.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b34286fc8c79b212df24d97d9759dd090c6454aa26673f35f25ca77e9b35d9ef |
|
MD5 | 3cceae7ea18e59d3b353060c16984c77 |
|
BLAKE2b-256 | fe9bb36277ca1bad486a2b910b2364ac1286202156de405de775049675c7a453 |
Hashes for cornflakes-3.1.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c7f1b18e64ef733a703414d0f3d067aa9f3bcf0a0febd2c0e423489fa44afd1 |
|
MD5 | 7632485ec1d62857dc4c19af21fbe558 |
|
BLAKE2b-256 | 4db5c33883f519b4abe06ca3b7d38dec984877db9e5fe3a01d18fd8798679954 |
Hashes for cornflakes-3.1.0-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ad84406d861043405f6647f7371bffa3d7ee2e35e0bbf15049d4f088461c38e |
|
MD5 | 9532d8d0a8972f7564219cb0b3297995 |
|
BLAKE2b-256 | c504397c2b37ff948ae45e8f146d26df91618a7cf37d1f3b0fc0f2a6f710627e |
Hashes for cornflakes-3.1.0-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68f4fd81dabb0ac93eacf68fbfc287c8a92f70b6e1af6207fb887d83f258a65d |
|
MD5 | bc22f6a270687ffef52dd9487152e739 |
|
BLAKE2b-256 | 63d78a5babbd4b092b22edc583ca4e58194841ec471654d12f56d60835de284a |
Hashes for cornflakes-3.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 417c4d23ed6a38a83054c0494c2b6bada01f39b41cf1d480d899ded9ff46415b |
|
MD5 | c7fa6047349adc671ba8d63b7cf02697 |
|
BLAKE2b-256 | 70202ef2b5005e2780c79ac257850bb38ef5cc493d598f70508249ab06201598 |
Hashes for cornflakes-3.1.0-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 824bf9862fb17877c45bb826b5bdcff4c14f7c3feac6e55b2168530c9db49874 |
|
MD5 | 91570c45af954b6cd6ccee414609516d |
|
BLAKE2b-256 | 129c24220e5289b77bc2e3eec1fd26eac645ac2b54fc64949044eb8294364e2f |
Hashes for cornflakes-3.1.0-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1d1c81c5142b254eadda86f6e224f034e1332634b7a6d88fbfa60aa45dc1073 |
|
MD5 | 84c718a070cd468230832f482f56fe53 |
|
BLAKE2b-256 | 81255a046d1ed755f975ccdc431a6b36ffe934bdf5c0c6fa26a2c24412e716e1 |