qdsl takes the tedium out of nested dicts and lists.
Project description
Overview
Make digging around in nests of python dicts and lists less tedious.
Optimizations
- Intern node names so the strings aren't duplicated. This saves a huge amount of memory, especially for things like openshift resources.
- Desugar/compile queries into regular python functions, special casing where possible.
- Generate regular python functions from Boolean ASTs passed to queries. The "compilation" takes microseconds.
- Query the entire flattened tree at once in "find" since it's equivalent to querying individual nodes and accumulating.
- Simplify the where API so we don't need a separate WhereBoolean hierarchy.
- Use tuples instead of lists for values and children. Tuples are slightly smaller.
- Branch "value" defaults to an empty tuple. Since it's a default keyword value, all instances share the same one.
- Use slots.
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
qdsl-0.2.4.linux-x86_64.tar.gz
(19.2 kB
view hashes)
Built Distribution
qdsl-0.2.4-py3-none-any.whl
(14.9 kB
view hashes)