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+
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.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25029e4e38734a8b6343280dd4ec4821d14263e2d85e765ea2b5e2e00d50c2cc |
|
MD5 | af90098d22887a28839562ee9a0548d1 |
|
BLAKE2b-256 | 0442c76c290d8f6ea965955247a4245e035ac7f35e6226f167fc4fc689a2e45b |
Hashes for cornflakes-3.0.4-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2170c6847f56d76f4154906da8ae5941cf305646ed838fa69e5b172d2800695e |
|
MD5 | cead1fcd604cda06efa4d56dd27a4461 |
|
BLAKE2b-256 | bad516790b2d11d5f4afd8785445cdfb64fc0068b74ba552fe1c523ca6bc4ea8 |
Hashes for cornflakes-3.0.4-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 657ac2ad423118822ef05234a5f96037bd1ed4c79669ab051bc7bdcf3d17079f |
|
MD5 | 5940f3abfa1b7728253e5932aaee576a |
|
BLAKE2b-256 | 4d19085e41d71f2169f97b74901b6cd6087abe764a0506eb4bf56eb6fa73450b |
Hashes for cornflakes-3.0.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bde04f2c252e3c7a32636b99da998c0812ad22d8f26762a7569ef500ff151427 |
|
MD5 | 87de61c60237c055cef027e71c38400b |
|
BLAKE2b-256 | b4411c2609a9b2e55d84dfbdf940106f5aafed504c06c70047ea330ae9e7a2ea |
Hashes for cornflakes-3.0.4-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b13b6658f4923a36ae86c8f289cef71ac2c592011f0975dbd79e80409f8a76a1 |
|
MD5 | 87c65c3321a15d95393f244d6cde9921 |
|
BLAKE2b-256 | 18ef1b4b93358dc2ee03e8c5b420946711094d48f7aadda1cdb91d38631d1465 |
Hashes for cornflakes-3.0.4-cp310-cp310-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d030ab1ebada823e322aaee219c927f5c46d8d310e67343cb66c6263bf6b2fc |
|
MD5 | 320838b75dfc3c0999d72a4336db2a83 |
|
BLAKE2b-256 | 5d0d8924f8c5303852e764e8f957af10be546732e118975fb1099da49512c885 |
Hashes for cornflakes-3.0.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f82b57a9a4cc1fe68c8be309757e43dd5c47e2b7a1fa4bd2832d49c929574c1 |
|
MD5 | 757082cadf4ad15827e0d786bc6a89bb |
|
BLAKE2b-256 | a7214687feed705f54f8daefe5457d50792086744e7d7663d2909425929f6a9c |
Hashes for cornflakes-3.0.4-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a17691d3587979f6bfc6f9917e878fcc329ec0c6b1ffd496b1b73d04d2e244fb |
|
MD5 | 346ee8041f0bf4840aebcf0dc8cef80f |
|
BLAKE2b-256 | beb40b6191c467b2b92080ff08a1a6cb54e4db9caddbb2a19525f7f8652cdd7c |
Hashes for cornflakes-3.0.4-cp39-cp39-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f817795009bd60232774bf77a7782592bedaafbd02412cddeb20e58e80de42bb |
|
MD5 | ee325d5270afcb4e1e1e52ee8cb7962f |
|
BLAKE2b-256 | ef7b521fca6a6ce5a7896add4d32a40b4c7693f78a5a5c10a22483a1d8dc2342 |
Hashes for cornflakes-3.0.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f50ccc7061177f7bdd6c850c02b4500b7006422d629eea5100b3e03d63f7cba5 |
|
MD5 | 0559702239af63e1d87cdecc029296d0 |
|
BLAKE2b-256 | bea2e76a3486ab9aa6aad1a083944d0514990d98f6a4db24b97d360517209a15 |
Hashes for cornflakes-3.0.4-cp38-cp38-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68be06a2582176259f0db36b4faca3f764c2b07716340540cfcba71b838299bc |
|
MD5 | e8f2d69f021c1929fb680463df3db37c |
|
BLAKE2b-256 | d0015d10b5168888b0ab48b62c7fcad62dd65a11313903e8181ec1fadf12908d |
Hashes for cornflakes-3.0.4-cp38-cp38-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 372eaca3312e397dbb3b69dc497fd34603873aad4fc1c1bbb0373c1cbbf155c8 |
|
MD5 | c8a32ea492eb659331a1901bf44db21d |
|
BLAKE2b-256 | 2643cf2666b2452378be6e085e1c47517fea1d51f0b372bbcc1276b5a812d3ac |