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.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c81c2820ec8f31612d5f0830944348df01602392466f0bee21392042dd1ccee |
|
MD5 | 2e06683f91742531937bfeb6b291cb69 |
|
BLAKE2b-256 | 8a5821af06b30dcbfb39afbd00183d8f68d6dd8c58e47b064ba334254435fc23 |
Hashes for cornflakes-3.0.2-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32185583188751611207c7a032ce1b1a2e2da9db24c8682fc78b6cc723ceb244 |
|
MD5 | e0b69b36ab1f3035b831d16110d4ac54 |
|
BLAKE2b-256 | 222af296ab8abb77d04722a1d24cb74d571c57284437a81fbc7c7863b3a66536 |
Hashes for cornflakes-3.0.2-cp310-cp310-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce829eacf8aea9fa572a4464e697f37d80445811d8205ed3d6eb575fa78f6f44 |
|
MD5 | 37a08bb4e8ca0eba1b0602fd7f0f44b4 |
|
BLAKE2b-256 | e58bbc8b7f3ce5b3810f2c3a29d9f1a4750b06f90623862b896cc518fbac9ec5 |
Hashes for cornflakes-3.0.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbeb2f086efaa81d1754296e95f80c8173c1634a56ed9bf5981d09184ff33f58 |
|
MD5 | 119c3a29e74b85af44c7d50d7d1a8202 |
|
BLAKE2b-256 | 59531a3aed5fc99403831800e952b458185c7e0870d71aaf6bd6708c219943ee |
Hashes for cornflakes-3.0.2-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 178d51d29a571a4d485ee6ad8e3932a1ceb4fd882f7a2032d05f1bdb5d63a213 |
|
MD5 | 6055544de0d5f41b173da26b888ed16b |
|
BLAKE2b-256 | 23f49c5ea83dd97c7f011475553141c48f1a81c063842518b7765a87990ec398 |
Hashes for cornflakes-3.0.2-cp39-cp39-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e865a162364fc30d616c98c77a5215df01030ebd483266507f29eeda202639b5 |
|
MD5 | 19906459970b0a0c33a6797a8dcd065a |
|
BLAKE2b-256 | 299bec2e71b0232ef1da347a4c5ff919e541f140b432fddf51cc04871cd006a2 |
Hashes for cornflakes-3.0.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3102fdaee6bfe819eeba997ef090d8fc5668b2f28899800176293bce484026d |
|
MD5 | 716ef719d4989db5d9e23c1f2423a31c |
|
BLAKE2b-256 | 7448040c66e3e64a3a2028e100c76d5f209e2804bcdc6eb421be931da5ffa78d |
Hashes for cornflakes-3.0.2-cp38-cp38-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 753545a1d2406bcfa0489c266b05ea006449372c88552e5b7bc0e61f3d197221 |
|
MD5 | fa59e08ea7497fa1190b39099f3ddd17 |
|
BLAKE2b-256 | 5edf0eba0752c774a57e28e47687043fba4c9afca89e4c5d0a8396b51b16fe8a |
Hashes for cornflakes-3.0.2-cp38-cp38-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63559e725ddb515703bdf08f4fcacef071d7a2fa38641ef5f8af40954b5a6502 |
|
MD5 | 97fdfbbb211b51d78863d7624e133099 |
|
BLAKE2b-256 | 49c913dd0d787fccb18156971e26590e454ea6c969d013b367e2073238ca8c79 |