No project description provided
Project description
cuddly_dicts
Turn a KDL document like this:
landtable version=1 {
// Minimum compatible Landtable version
ensure_landtable_version "0.0.1"
provisioning {
// Whether to allow runtime provisioning
// (whether you can add/remove fields via the API or the web)
allow_runtime_provisioning true
// A provisioning strategy defines how a new database can be
// created.
strategy "Nest Postgres" {
primary {
using "postgres_provisioning_plugin"
hostname "hackclub.app"
authentication "userpass" {
username "sarah"
password "i_l0ve_hC!"
}
// or:
authentication "vault-pg" {
path "database/creds/landtable"
}
}
}
}
}
Into a dict like this:
{
"landtable": {
"version": 1,
"ensure_landtable_version": "0.0.1",
"provisioning": {
"allow_runtime_provisioning": True,
"strategy": {
"Nest Postgres": {
"primary": {
"using": "postgres_provisioning_plugin",
"hostname": "hackclub.app",
"authentication": {
"userpass": {
"username": "sarah",
"password": "i_l0ve_hC!"
}
}
}
}
}
}
}
}
Motivation
- Keep using Landtable's existing validation library (Pydantic)
- Support multiple configuration languages (TOML, JSON, YAML, whatever!) by making them all compile down to the same representation that can be validated
Conversion rules
- KDL node -> dict result
landtable {}->{"landtable": {}}.version 1->{"version": 1}- Repeated
versionnodes will create a list.
Will turn intoalias "High Seas" alias "hs"{"alias": ["High Seas", "hs"]}
- Repeated
landtable version=1 {}->{"landtable": {"version": 1}}strategy "Nest Postgres" {}->{"strategy": {"Nest Postgres": {}}}- Repeated
strategynodes will add another entry to the dict.
- Repeated
License
MIT or WTFPL, depending on how much of a prude you are
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cuddly_dicts-1.0.1.tar.gz.
File metadata
- Download URL: cuddly_dicts-1.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40f7a361de79ff09ffc1df8ac8a18c925c31d8c721e8edeb13a4cd4b2285716d
|
|
| MD5 |
c44a9eff08e8dd0efdf807c75455d8f1
|
|
| BLAKE2b-256 |
3034f88a72c4d91445fdb26a26c475b20c78870c6f70bed83332f34cfa67e314
|
Provenance
The following attestation bundles were made for cuddly_dicts-1.0.1.tar.gz:
Publisher:
workflow.yml on iamawatermelo/cuddly-dicts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cuddly_dicts-1.0.1.tar.gz -
Subject digest:
40f7a361de79ff09ffc1df8ac8a18c925c31d8c721e8edeb13a4cd4b2285716d - Sigstore transparency entry: 163514078
- Sigstore integration time:
-
Permalink:
iamawatermelo/cuddly-dicts@e58e91b7cfaf3323d56c4209d88b401e4e7842e7 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/iamawatermelo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@e58e91b7cfaf3323d56c4209d88b401e4e7842e7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cuddly_dicts-1.0.1-py3-none-any.whl.
File metadata
- Download URL: cuddly_dicts-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae9610256a9770e2902640a3dc948e53f341e1466ef1f32d3f2f6b54756a9034
|
|
| MD5 |
b3362d19c235ed8f9a6207c7f4e4df0d
|
|
| BLAKE2b-256 |
f2c81d2533de0831705d572fdf561e69cb1ea29bb4bfe20c5e8389815acde97b
|
Provenance
The following attestation bundles were made for cuddly_dicts-1.0.1-py3-none-any.whl:
Publisher:
workflow.yml on iamawatermelo/cuddly-dicts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cuddly_dicts-1.0.1-py3-none-any.whl -
Subject digest:
ae9610256a9770e2902640a3dc948e53f341e1466ef1f32d3f2f6b54756a9034 - Sigstore transparency entry: 163514080
- Sigstore integration time:
-
Permalink:
iamawatermelo/cuddly-dicts@e58e91b7cfaf3323d56c4209d88b401e4e7842e7 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/iamawatermelo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@e58e91b7cfaf3323d56c4209d88b401e4e7842e7 -
Trigger Event:
release
-
Statement type: