cels
nestedtextto
cels | nestedtextto | |
---|---|---|
3 | 5 | |
10 | 16 | |
- | - | |
7.9 | 9.6 | |
6 months ago | 7 days ago | |
Python | Python | |
MIT License | Do What The F*ck You Want To Public License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cels
-
Interactive Examples for Learning Jq
Not a 1:1 replacement, but I created https://github.com/pacha/cels because I wanted to have a more intuitive way of working with JSON and YAML files
-
That's a Lot of YAML
I agree. I find working with templated YAML so cumbersome that I ended up creating a tool (Cels - https://github.com/pacha/cels) because of it. I like Jsonnet and Starlark but in practice I donโt usually need a new programming language for most use cases. Most of the time I just want to create a base document and apply patches to do modifications. That simplifies everything a lot.
- Show HN: Cels โ A bit less YAML/JSON struggle
nestedtextto
-
The yaml document from hell
I used the official reference implementation to make a CLI converter between NestedText and TOML, JSON, and YAML. When generating one of these formats, you can use yamlpath queries to concisely but explicitly apply supported types to data elements.
-
The YAML Document from Hell
I'm a huge fan of NestedText, especially as there is no escaping needed ever.
If you ever want to use it as a pre-format to generate either TOML, JSON, or YAML, I used the official reference implementation to make a CLI converter between them and NestedText.
When generating one of these formats, you can use yamlpath queries to concisely but explicitly apply supported types to data elements.
- My CLI converter: https://github.com/AndydeCleyre/nestedtextto
- yamlpath info: https://github.com/wwkimball/yamlpath/wiki/Search-Expression...
-
A practical issue with YAML: your schema is not documentation
In case you're interested and haven't seen it, I've become a big fan of NestedText, which is similar to YAML but without the complicated parts, and without types (just strings, lists, and dicts). The idea is that any meaningful validation and coercion belongs in code anyway. An extra cool part is that nothing ever needs to be escaped, so the content is super clean and unambiguous.
If you want to play around with it, I made NestedTextTo (nt2 on PyPI), for CLI conversion between NestedText and YAML, TOML, or JSON, with a pretty cool (IMO) way to cast value types along the way.
https://nestedtext.org/en/stable/ (not my project)
https://github.com/AndydeCleyre/nestedtextto (my project)
-
How do you yaml
I recently fell in love with the NestedText format, and whipped up a CLI for conversions between it and YAML (and JSON and TOML), so now whenever manually viewing those other formats I pipe it through into readable NestedText. In this example, the result is identical to format A.
-
nt2: a CLI converter between NestedText and JSON, YAML, or TOML
So I made nt2 (NestedTextTo) (install from PyPI as nt2[toml] for TOML support).
What are some alternatives?
pyserde - Yet another serialization library on top of dataclasses, inspired by serde-rs.
sexplib - Automated S-expression conversion
python-benedict - :blue_book: dict subclass with keylist/keypath support, built-in I/O operations (base64, csv, html, ini, json, pickle, plist, query-string, toml, xls, xml, yaml), s3 support and many utilities.
lua-sandbox - A lua sandbox for executing non-trusted code
click-extra - ๐ Extra colorization and configuration loading for Click.
sexp - S-expression swiss knife
remarshal - Convert between CBOR, JSON, MessagePack, TOML, and YAML
strictyaml - Type-safe YAML parser and validator.
msgspec - A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
sxpyr - Parse s-expressions, edn, and a variety of lisp dialects.
mashumaro - Fast and well tested serialization library
json5-spec - The JSON5 Data Interchange Format