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 details)
Built Distribution
qdsl-0.2.4-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file qdsl-0.2.4.linux-x86_64.tar.gz
.
File metadata
- Download URL: qdsl-0.2.4.linux-x86_64.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 760a6364704c3a3a452ef632299b09db4e4d18dc0758c49bc4305b06155c69d4 |
|
MD5 | ae8d62e843296d54359006eb68dc08e0 |
|
BLAKE2b-256 | 52a3c6832fc342a6824db989110035364fe16078eccf7a9a67e5f3f044d883a0 |
File details
Details for the file qdsl-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: qdsl-0.2.4-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f2d1962bf577654bdd869f76e19bbc90f182f2bcaf2d781e4dc234dbc39cdd3 |
|
MD5 | a8a48f77ba6805bb3424b2c958daa7f0 |
|
BLAKE2b-256 | bea93aab9bc83845577c43fd215d3e7d4fc33d964bd594e3e92ccdec77858d64 |