frkl
elastic dictionaries (and configuration)
Description
frkl is basically a string/object transformation library, with the main goal being enabling as minimal as possible initial state. I rather suspect that this here is one of those things whose value won't be immediately obvious (if there is one at all -- still not sure about that myself), and examples might be a better way of explaining what its use is.
frkl is most useful for cases where you have a list of similar configuration items, which might or might not inherit from each other. In those cases, you don't want to duplicate information that is needed for each of the items. To illustrate, here's some yaml:
vars:
location: at_home
task_type: cleaning
tasks:
- clean_bathroom
- clean_living_room
- clean_desk:
location: at_work
This task list describes how we want to clean three things, two of which are at home, and one is at work. Our robot would not like this way of describing it though, since it is much harder to parse. For example, there is no 'proper' schema, the list for example has mixed types, strings and a dictionary with one key/value pair. What our robot would want is:
- task:
name: clean_bathroom
vars:
location: at_home
task_type: cleaning
- task:
name: clean_living_room
vars:
location: at_home
task_type: cleaning
- task:
name: clean_desk
vars:
location: at_work
task_type: cleaning
Basically, this is what frkl does: expanding (and also modifying if wanted) configuration from as minimal as possible to as comprehensive as necessary.
Now, of course, in this example the reduction in size is not that big. And, one might argue, not having a fixed schema might not be a good idea in the first place. I can even see the point, but I do like being able to express myself as simple and minimal as possible. Obviously we are introducing more fragility by loosening up our schema. But we gain clarity, and ease of use. Whether this trade-off is justifiable or not depends on the situation I think. This library is for the situations where it is :-)
frkl is written in Python.
Features
- transform configurations, focusing on clarity and the removal of redundancy
- plug-able architecture
- pre-made string/object processors/filters (regex, url abbreviation, jinja templates, etc.)
- auto-downloading, merging of configuration items
- mix and match of local and remote configuration items
Development
Assuming you use pyenv and pyenv-virtualenv for development, here's how to setup a 'frkl' development environment manually:
pyenv install 3.7.3
pyenv virtualenv 3.7.3 frkl
git clone https://gitlab.com/frkl/frkl
cd <frkl_dir>
pyenv local frkl
pip install -e .[develop,testing,docs]
pre-commit install
Copyright & license
Please check the LICENSE file in this repository (it's a short license!), also check out the freckles license page for more details.
frkl product ids
Versions:
- 0.9:
- 97de2bf5-0fbb-4884-9d26-488217e1477c
- 1.x.x:
- 97de2bf5-0fbb-4884-9d26-488217e1477c
Metadata
Release files for frkl 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| frkl-1.0.0.tar.gz | 93.4 kB | Without provenance | Details for frkl-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frkl-1.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for frkl-1.0.0-py2.py3-none-any.whl |
Total release size: 123.1 kB
Release files / frkl-1.0.0.tar.gz
| Download URL | frkl-1.0.0.tar.gz |
|---|---|
| Size | 93.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c62ff6bd8d4be675d76a57089c0c29cd41db878eeef432b0299db3edb5d3a5f
|
|
BLAKE2b-256 checksum How to use checksums |
0e80384015e692461c643ef0b8f3957fe1b8b16e0f4141b54dac09795728b54e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
devpi-server/5.0.0 (py3.6.8; linux)
|
Release files / frkl-1.0.0-py2.py3-none-any.whl
| Download URL | frkl-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 29.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f9f5c53e2c970c72f86821aa9b4af8df2aaf48a05b1885cd2a6c9dda3c660262
|
|
BLAKE2b-256 checksum How to use checksums |
feb4e2696d3d28f9f95f8caaf94a08100dbba9789f552b5b2ca2b5ffe91ea1c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
devpi-server/5.0.0 (py3.6.8; linux)
|
Security for frkl 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.