Skip to main content

Create generic any easy way to manage Configs for your project

Project description

cornflakes logo

PyPI Python Version License Read the documentation at https://cornflakes.readthedocs.io Build Package Status Run Tests Status Codecov

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

Short Term RoadMap:

  • Enrich json methods

  • Fix / Test the to_<file-format> Methods

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

cornflakes-3.3.2.tar.gz (3.1 MB view hashes)

Uploaded Source

Built Distributions

cornflakes-3.3.2-cp311-cp311-win_amd64.whl (228.7 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

cornflakes-3.3.2-cp311-cp311-manylinux_2_35_x86_64.whl (356.3 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.35+ x86-64

cornflakes-3.3.2-cp311-cp311-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl (359.4 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

cornflakes-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (380.6 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

cornflakes-3.3.2-cp311-cp311-macosx_10_15_x86_64.whl (301.0 kB view hashes)

Uploaded CPython 3.11 macOS 10.15+ x86-64

cornflakes-3.3.2-cp310-cp310-win_amd64.whl (228.4 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

cornflakes-3.3.2-cp310-cp310-manylinux_2_35_x86_64.whl (356.3 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.35+ x86-64

cornflakes-3.3.2-cp310-cp310-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl (359.4 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

cornflakes-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (380.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cornflakes-3.3.2-cp310-cp310-macosx_10_15_x86_64.whl (301.0 kB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

cornflakes-3.3.2-cp39-cp39-win_amd64.whl (228.6 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

cornflakes-3.3.2-cp39-cp39-manylinux_2_35_x86_64.whl (356.4 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.35+ x86-64

cornflakes-3.3.2-cp39-cp39-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl (359.6 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

cornflakes-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (380.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cornflakes-3.3.2-cp39-cp39-macosx_10_15_x86_64.whl (301.2 kB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

cornflakes-3.3.2-cp38-cp38-win_amd64.whl (228.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

cornflakes-3.3.2-cp38-cp38-manylinux_2_35_x86_64.whl (356.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.35+ x86-64

cornflakes-3.3.2-cp38-cp38-manylinux_2_28_x86_64.manylinux_2_24_x86_64.whl (359.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64 manylinux: glibc 2.28+ x86-64

cornflakes-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (380.4 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cornflakes-3.3.2-cp38-cp38-macosx_10_15_x86_64.whl (301.0 kB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page