lua-patterns
pyyaml
Our great sponsors
lua-patterns | pyyaml | |
---|---|---|
1 | 16 | |
27 | 2,406 | |
- | 1.7% | |
0.0 | 3.9 | |
over 1 year ago | 10 days ago | |
Rust | Python | |
MIT License | MIT 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.
lua-patterns
-
The Norway Problem
If you want automatic built-in string validation, one option that seems particularly interesting is to use a variant of Lua patterns, which are weaker and easier to understand than regular expressions, but still provide a significant degree of "sanity" for something like an email. The original version works on bytes and not runes, but you could simply write a parser that works on runes instead, and the pattern-matching code is just 400 old and battle-tested lines of C89.
Lua patterns have also shown up in other places, such as BSD's httpd, and an implementation for Rust:
https://www.gsp.com/cgi-bin/man.cgi?section=7&topic=PATTERNS
pyyaml
-
Cython 3.0 Released
Mostly because of PyYAML: https://github.com/yaml/pyyaml/issues/724
PyYAML knew about the breakage since january 2022[0], and nothing really happened. After a year and a half with lots of alphas and betas, I don't think there is much cython could do, short of fixing PyYAML themselves.
- I'm needing a hand, I do not understand some (seemingly) simple Python stuff.
-
Using Rust to not have to touch Yaml in k8s land
Note some parsers, most notably pyyaml are still at yaml 1.1, because 13 years is just not enough time to update it.
-
I accidentally used YAML.parse instead of JSON.parse, and it worked?
Many parsers either default to YAML pre-1.2 or do not even expose a YAML 1.2 option. PyYAML has no 1.2 option, for example. So unless Ansible is using something other than PyYAML...
Relevant (open) PR: https://github.com/yaml/pyyaml/pull/555
- The Norway Problem
-
Strict YAML deserialization in Python with marshmallow
So I imported PyYaml and call load method:
What are some alternatives?
confuse - painless YAML config files for Python
strictyaml - Type-safe YAML parser and validator.
yamllint - A linter for YAML files.
jsonnet - Jsonnet - The data templating language
dhall-lang - Maintainable configuration files
marshmallow - A lightweight library for converting complex objects to and from simple Python datatypes.
python-strict-yaml-parsing - Examples of strict yaml parsing in python
edn - Extensible Data Notation
python-frontmatter - Parse and manage posts with YAML (or other) frontmatter
kubernetes - Production-Grade Container Scheduling and Management