zenmai
toylang on yaml or json
command line example
main.yaml
code:
$import: ./filters.py
as: f
definitions:
$let:
nums: {$load: ./nums.yaml#/definitions/nums0/enum}
odds:
type: integer
enum:
$f.odds: {$get: nums}
even:
type: integer
enum:
$f.evens: {$get: nums}
nums.yaml
definitions:
nums0:
type: integer
enum:
[1, 2, 3, 4, 5, 6]
nums1:
type: integer
enum:
[1, 2, 3, 5, 7, 11]
filters.py
def odds(nums):
return [n for n in nums if n % 2 == 1]
def evens(nums):
return [n for n in nums if n % 2 == 0]
run.
$ zenmai examples/readme2/main.yaml
output
zenmai main.yaml
definitions:
odds:
type: integer
enum:
- 1
- 3
- 5
even:
type: integer
enum:
- 2
- 4
- 6
config loader
using zenmai as config loader.
from zenma.loader import load
with open("config.yaml") as rf:
d = load(rf)
0.3.0
$concat improvement
tiny error reporting improvement
changing $load’s scope
0.2.3
fix loader bug
0.2.2
fix –data bug
0.2.1
raw format
0.2.0
add $inherit action
zenmai as config loader
0.1.0:
first release
Metadata
Release files for zenmai 0.3.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 |
|---|---|---|---|---|
| zenmai-0.3.0.tar.gz | 9.2 kB | Without provenance | Details for zenmai-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zenmai-0.3.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for zenmai-0.3.0-py2.py3-none-any.whl |
Total release size: 24.9 kB
Release files / zenmai-0.3.0.tar.gz
| Download URL | zenmai-0.3.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bd953fa684ac6da28c6deff54a526790a10c645fb42b79063f5d2f6fd7cc229
|
|
BLAKE2b-256 checksum How to use checksums |
83097473287c9ab008ccf1a279770afa5e1398bbe7b277566a5c39127615e8c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / zenmai-0.3.0-py2.py3-none-any.whl
| Download URL | zenmai-0.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
334bafa0a313c09799c491715a4fb3f5f9ff62328b57136df2af373d72a7a814
|
|
BLAKE2b-256 checksum How to use checksums |
163d4d5d3680e1c0c28e2abc22dbbcb4712eb3e5bba84c29987daa18d682b897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for zenmai 0.3.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.