ymm
YAML Mimics Makefiles
YMM is one of the first examples of YAAPL: YAML as a Programming Language
YMM uses standard YAML files with a few special conventions to function as a task runner. In addition to simply creating lists and dictionaries, YMM can execute commands (and thus return values) based on the 'control character' at the beginning of a line.
Getting Started
$ pip install ymm $ ymm --version
Data Structures
YMM files have a top-level dictionary, whose keys are called "actions."
Type $ ymm <action> to execute and return the results of that action, which can be a dictionary or a list.
Dictionaries will set the results of that action to the key, which can be accessed as a {variable} in future actions.
There are also two special actions:
initwhich is always executed before any other actiondefaultwhich is executed if no action is specified
Scope
Variables cascade via the following rules
- Built-in Actions (see
src/ymm/builtin.yml) - Environment variables (which are loaded at runtime)
- init
- prior actions
- current action
Control Characters
- '.' run this YMM action
- '$' run this in the shell
- '+' execute this Python string (use '"""' for docstrings)
- '^' pipe the prior result into this shell command
- '~' pipe the prior result into this jquery path
Motivation
Because I love YAML, and miss rake.
I tried PyPyr, which is brilliant but painfully verbose.
I was going to write a preprocessor, then realized it was simpler to just execute the commands myself.
Metadata
Release files for ymm 0.6.1
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 |
|---|---|---|---|---|
| ymm-0.6.1.tar.gz | 10.0 kB | Without provenance | Details for ymm-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ymm-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for ymm-0.6.1-py3-none-any.whl |
Total release size: 16.7 kB
Release files / ymm-0.6.1.tar.gz
| Download URL | ymm-0.6.1.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11b8f49af8c60c51c006c83b133a7f8641feeb26d56e65e220770b76321ba2cb
|
|
BLAKE2b-256 checksum How to use checksums |
3d5fd53e3d213f3d4ba45863ea09cd4f711f948712fc3e6fb8a4a6ec50422a59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / ymm-0.6.1-py3-none-any.whl
| Download URL | ymm-0.6.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c202e75156bec823de0477709b26b8013d053d9ff131acec7739bed54ca0f227
|
|
BLAKE2b-256 checksum How to use checksums |
88c9cc8b412317a85f1f5dc41c6bb37a51b1489df7e66808c6639ad6066502be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for ymm 0.6.1
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.