Create generic any easy to manage Configs for your Project
Project description
pip install 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
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+
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.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edc0459865f1919294fc798f8482d7255c69fde5779936a66e4cc8cb95775753 |
|
MD5 | dc1c9d775e6d72f98de831e0bcf3a4a3 |
|
BLAKE2b-256 | 8359db5321074fc3b3785f2144df16422fb5fac3a2d6a1ae349acd52e5054c46 |
Hashes for cornflakes-3.0.0-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c03d1b5b8026c092daba3c1a76cfa3d6ed60d522b8ff9359a73b8f66b26ec796 |
|
MD5 | abd010636e7fcce9f6327c855167dcfb |
|
BLAKE2b-256 | 1b6a3da9f47027599d3193cc75b18d950bbd795c6c5954d5f65e4c2dc09faa18 |
Hashes for cornflakes-3.0.0-cp310-cp310-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 300a0675405d5de11870927deb4a156b3be04134bfd99690b383212e6fc53736 |
|
MD5 | f6fb0295fd670909c67110056f7da593 |
|
BLAKE2b-256 | 2d85328df506576f5a7857786b369c898c350a06e41779d2e73a57ec55361ce2 |
Hashes for cornflakes-3.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63e672f683035f1f8be755ad9c1061653ded6c89d236eecd34358754214963c9 |
|
MD5 | bccab403065e46b986539d6d00418137 |
|
BLAKE2b-256 | b88e1c1bf4d79e3dc2cc564bf06a5431f281093a278bdb8e93ca3d28d47c3cc7 |
Hashes for cornflakes-3.0.0-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 982116d1b24ad5f53b3a8cadfdb976ed3ecf06c443ef499cc9d650bed5bf85d0 |
|
MD5 | bc231388206548423828fef0c27b4d98 |
|
BLAKE2b-256 | 0beae7f8839a8209afda8f7eb8c79d945fc75dfa1782dfd5df6830254f329085 |
Hashes for cornflakes-3.0.0-cp39-cp39-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eae2821c3455751c750e2b43ee3eb0cc34bf3dd1c33da05ba133d7829e421bb5 |
|
MD5 | 328ee9d830ce854ee5ddc2053f96c86e |
|
BLAKE2b-256 | 072cd6c68c08e88097655607fbe60092bcfdcb46face3a4a18b83cb1b02a1525 |
Hashes for cornflakes-3.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9aa4574949330ee428f4f3852018454ed2688940789ef6bf2b9d74124b5a5425 |
|
MD5 | efff361f4a427895135d8f3bb5997ba0 |
|
BLAKE2b-256 | b51a132e795e9306d3c78620fd77c953060a1aad39255828dd44e222f4a8ce15 |
Hashes for cornflakes-3.0.0-cp38-cp38-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bb4a3706a914c69f0f02badb07b508688e30f0d05414820c7533a046acd5c49 |
|
MD5 | e5c9d6d841d2409365a7c02a9f7bafe8 |
|
BLAKE2b-256 | d352122a6a4a97f2b0c46088477634b2b9a7b727f3d1b5dd3de6b4fed0495b36 |
Hashes for cornflakes-3.0.0-cp38-cp38-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d401ceee57efbe2050e4e49b31a1a3c26e7f74d6b132a6166c9a133c7265cc63 |
|
MD5 | 52bbde46dfb10ee218a24ece67dbd6d6 |
|
BLAKE2b-256 | 9469d9fdf2e8936f1b30a694ee1971894a8626cdcc1cb1d933208720306a538d |