Create generic any easy 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.8-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 215e09f7d74fe5cdb81eb7b31bfb4cb7867f6ce05272b2b15ff28749ed82d327 |
|
MD5 | 8ac2c9bb484787ffdb4b0229157f38b7 |
|
BLAKE2b-256 | b2dd40128c072aea0c55f20374e2fd19de0d4afcaaa7598557ff885593e39150 |
Hashes for cornflakes-3.0.8-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ea3b911de910a278ce80108561f0d4dba9f0cb3a77665b103eba8085de95660 |
|
MD5 | a203f3e250d92033e95c3e590e21d8f7 |
|
BLAKE2b-256 | b6f67ec90ebc433f524677ef550ad6aa412b5964ce4c4c511722e8b7a09e548c |
Hashes for cornflakes-3.0.8-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8da4c91b81693371334bcc3a67fd166c753f2486dcf1246359624ddc00264264 |
|
MD5 | 01fb4d9ec77025f42832fe4a8eee40c7 |
|
BLAKE2b-256 | 734e68500848064f6e0af83e04aa07c9a35253ad8aa70341171381fb18dda964 |
Hashes for cornflakes-3.0.8-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d9d1ef872c2f7c0e8db0d3b80340b79bbf98882479f2a4ed71abd4ac0b8762b |
|
MD5 | e5b131b2768cfe3d6c641082ffadfbfd |
|
BLAKE2b-256 | 82afddd530ab238ce318ce0cc6d6bf916b67dfa13fbc4f3a2bc769500dc90e79 |
Hashes for cornflakes-3.0.8-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f441c320b3033004c6e05e944c6ba744adb9bae6577430d495955aacecf4e2de |
|
MD5 | e16fe488c36fac61b89778ddfc4c37f0 |
|
BLAKE2b-256 | 3962e2f07471b3598c8fae892d494535ec7ae4175ce1c03f6abf86c4233993bc |
Hashes for cornflakes-3.0.8-cp310-cp310-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9da0d6b532d3cd4b6c1b5038e1bd3327ffc1d83e707b3ce4cdf460c5b1bd4a33 |
|
MD5 | c289b0b8db68dfa61a3016dd1087d76f |
|
BLAKE2b-256 | c608e95a22e0a227401590f99b2711bd1863fa542dc17553999b06be9e382baa |
Hashes for cornflakes-3.0.8-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 591d3961e52a86071c735a8cfba5a020ded48edea376a823065459b087b57608 |
|
MD5 | 732df2db451b240404dee9b40cfe9931 |
|
BLAKE2b-256 | 2c1681fcb7762bb36d5e7f9576f5e30644dc28f712d8d06552829f5d95c1d223 |
Hashes for cornflakes-3.0.8-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b34646cbd8a033ab75aab59f094eac4fb6a7d94900797a96091fb289c9e140d |
|
MD5 | 65e4f129ddc793abdbfeb162ec34c7c7 |
|
BLAKE2b-256 | 9c476107861afdfce016508aa7b185132e87dd1cdf812ac6b304fa69b2444184 |
Hashes for cornflakes-3.0.8-cp39-cp39-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0e2c839a57c712c8b0e4300a10d6e7b0d5e93bea6a6099c306ab0d86f4c44fd |
|
MD5 | 1e5f320923e62683fca37366dc8aa41d |
|
BLAKE2b-256 | 48fb1a237e95914d6279c66980c3f7046c5d810086957535b4dcb0a1e0960fca |
Hashes for cornflakes-3.0.8-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76bb9235774345fb7837a26a42a150c6725af00fcd205abe02870847525f6d68 |
|
MD5 | 5a04a0e6a806523495d5629bc0b38368 |
|
BLAKE2b-256 | 64a5c329520fd5a8a7be1601d607d4a73db2c16dda4d05e5ca0015f6feb7fc12 |
Hashes for cornflakes-3.0.8-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c643d66ba61f431823f1840b852439df67dffb8b39bcfb13d989d31a674d5b1 |
|
MD5 | 5ba22c82355ce26f6f9da42a0468cc35 |
|
BLAKE2b-256 | e2c97923d0f1801739aea62621466a487484ff3ff39220aa8b674b50a644741f |
Hashes for cornflakes-3.0.8-cp38-cp38-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d885a5115e26ab9a9627d3d16bc246d14950c019895968308f341244954d5df |
|
MD5 | 7f111cb5fe6c72d42c38a12409de89c2 |
|
BLAKE2b-256 | 8bff3c53748c545dc158d9c701f173a338ae1504b841915d9dd2978885390aae |