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.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6715b73e06e4e3c3dcb555d1e429b3cc003eab767faa8f4b7e32fe28b147d769 |
|
MD5 | 11e6a08c72d70ec9ed88d45103260e26 |
|
BLAKE2b-256 | cd90c4fb844682105afd8029864d548f98a42e12c72612427a232d94ed9cec57 |
Hashes for cornflakes-3.1.1-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27f6c2cd3c3d8b4bc4443cf76643316227b9f8b5fed85ed9ab88c295c4f8c3bd |
|
MD5 | 34a8db57804670b269d11f4ea90f5d8a |
|
BLAKE2b-256 | df4fe84c49249e8102f9619eea9524c4300d609afd7c5bad281f0f4f6604023b |
Hashes for cornflakes-3.1.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2abd0974e6d41e3f5468d1ce1d506222c59f6dc4724bd1e4a7fa2e655772aeb3 |
|
MD5 | bad26afc79d7046bc24b3c652bbbca60 |
|
BLAKE2b-256 | 57e27d5940fdd03538019c4faa72d69c2e5607038176c96883727f0157ca8f5e |
Hashes for cornflakes-3.1.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de5e03f16041ac754b998c8a768d9df7fd406162c11a39b3ac526f5ec94e7e36 |
|
MD5 | d96ad604c827c806292302491b0b3d50 |
|
BLAKE2b-256 | d3f2dda149aed29ec5275a74f49166b3fdfa956e39c9aa42360b1717cd30bb34 |
Hashes for cornflakes-3.1.1-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86c5029863491e21c5a13b6b70136f19f9babfe44c20af4e7cdabd8822a81e28 |
|
MD5 | 0e0f9155ad4c99c4b920ddef7bffbdbe |
|
BLAKE2b-256 | 33fb91da15f0beb52abbe6d3639693533aa76a308576a78d01e9fba5ead9c529 |
Hashes for cornflakes-3.1.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 426008d83de2495704f8a854a2d3561aa1513babc29808b1e349e5f570794572 |
|
MD5 | 84983d681d52b7ae94fb57c890bd163c |
|
BLAKE2b-256 | 5970b65f11a308544fdb28fef9aabbcde440861be09f6134598970593c985f19 |
Hashes for cornflakes-3.1.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62176775d5961d3047439e08f54ae24d63c4496db9d146c4825793013654d7b7 |
|
MD5 | 5b9e603b26f6ae3bbc200c83f4cf18cb |
|
BLAKE2b-256 | 3a9f2092f09da18a3129cfa4faf85d2a738945cb8931fbeed57de9203d5401ca |
Hashes for cornflakes-3.1.1-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60d8de925f1393efc0dfbea2ad94fcee8c97c692a844e799272493cff7300c6a |
|
MD5 | a6e66c03a23bb5caf59cd7b071743888 |
|
BLAKE2b-256 | 974fc81eabfd4aa26988a30ee2d810c6a950c81033071bf4f20b20ffc41caa66 |
Hashes for cornflakes-3.1.1-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d241165f99402ea872979cef57e62fa10c4157e3f850dce12e04ad5743348bf |
|
MD5 | 4fecd60da3f4b255813070ddba2b138d |
|
BLAKE2b-256 | a9157bdf0443e90e5f63f0090821c495743f01b8b20695c9d177a0b12296d8de |
Hashes for cornflakes-3.1.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09a36aa96ff34a03dbe04a5ec8957af991e622c5aa505c287472367991c06d19 |
|
MD5 | b104efc2830b8b2484ab42df88622278 |
|
BLAKE2b-256 | 1c4a42f0f4003bafc88ed40e0c15429fca3f3677635a17cfb098aa51b72bb6fb |
Hashes for cornflakes-3.1.1-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dbf3444592dd149cc5831df3a745f2070d177fc319c23fa39a0aec0a901f484 |
|
MD5 | e5ae5aff1c4767347866e13be1fb643e |
|
BLAKE2b-256 | 7e277f6e41d059ce96b904beb9d9980fb9ae576f3be653e17bc613b6c789beb3 |
Hashes for cornflakes-3.1.1-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 488a23caac4f817735280960f0389a0d3f1b3c0c4f0c867019a6617758b95c06 |
|
MD5 | a8e86cf06c31b4276808027683fc2b7c |
|
BLAKE2b-256 | b34abef20cc65f6f12acb833b3da84892d5cd9a27f2e301097c6c6f23d357b6f |