This release is a pre-release and may not be stable for production use.
Needle
Navigating nested structures easily.
Description
The idea behind this package is to provide a simple interface allowing to "flatten" nested structures into a plain table where each key is represented as a fully qualified name that leads to a certain field in the structure. It is especially useful when dealing with complex configuration objects that are merged into one from several files or container, and include very long keys that aren't easily visualized via pretty printing.
Functionality
The package's goal is to provide a simple interface for navigating configurations right in the terminal while debugging an executed script. It provides two basic high-level functions:
from needle import search, view
obj = { ... } # some nested object
# parsing keys (with optional depth limitation)
s = search(obj, max_depth=3)
print(s.top.flat_keys) # all keys available on the topmost level
s.subsearch("dataset") # navigating to the "dataset" subsection
print(s.top.flat_keys) # now, the "dataset" subsection is on the top of the stack
view(obj) # starts an interactive mode as showed below
Showcase
Why?
The author of this package encountered a problem of navigating a deeply nested objects often enough to bother writing a dedicated package that (in his opinion) should simplify that endeavor.
Metadata
Release files for python-needle 0.1.dev38
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 |
|---|---|---|---|---|
| python-needle-0.1.dev38.tar.gz | 807.8 kB | Without provenance | Details for python-needle-0.1.dev38.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_needle-0.1.dev38-py3-none-any.whl | Python 3 | none | any | Details for python_needle-0.1.dev38-py3-none-any.whl |
Total release size: 818.4 kB
Release files / python-needle-0.1.dev38.tar.gz
| Download URL | python-needle-0.1.dev38.tar.gz |
|---|---|
| Size | 807.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56c9549f8a66ff33d94fe3e2e9c2d84d554e9b0c305bba3a38104553b7403747
|
|
BLAKE2b-256 checksum How to use checksums |
8463361217faf701a88ddf120e19525337a65770be317d08883c340bdd55222d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.2
|
Release files / python_needle-0.1.dev38-py3-none-any.whl
| Download URL | python_needle-0.1.dev38-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26293b93c6afa0a9fbba1fe0ac826fd0372eb2ef978a72505204e6b105e26a40
|
|
BLAKE2b-256 checksum How to use checksums |
270bad3aea10dec4eb60eb4f3640cb73c61dd9eacadd3d1c7252ffd8d084a2fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.2
|
Security for python-needle 0.1.dev38
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.