Sparse List 
Inspired by the post Populating a sparse list with random 1’s on StackOverflow.
A “sparse list” is a list where most values will be None (or some other default) and for reasons of memory efficiency you don’t wish to store these (cf. Sparse array).
This implementation has a similar interface to Python’s built-in list but stores the data in a dictionary to conserve memory.
Installation
sparse_list is available from The Python Package Index (PyPI) .
Installation is simply:
$ pip install sparse_list
Usage
See the unit-tests!
Contributing
Fork it
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Ensure the tests pass for all Pythons in .python.yml
Push to the branch (git push origin my-new-feature)
Create new Pull Request
Thanks
If you find this stuff useful, please follow this repository on GitHub. If you have something to say, you can contact johnsyweb on Twitter and GitHub.
Many thanks
I’m grateful for contributions to what was a solo project (hooray for GitHub :octocat:)! If you’d like to thank the contributors, you can find their details here:
https://github.com/johnsyweb/python_sparse_list/graphs/contributors
Metadata
Release files for sparse-list 1.0
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 |
|---|---|---|---|---|
| sparse_list-1.0.tar.gz | 4.2 kB | Without provenance | Details for sparse_list-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sparse_list-1.0-py3-none-any.whl | Python 3 | none | any | Details for sparse_list-1.0-py3-none-any.whl |
Total release size: 9.2 kB
Release files / sparse_list-1.0.tar.gz
| Download URL | sparse_list-1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bd4178f8528c6534a963985bcb2669a78759d4a0f7c24d54560d4f24ce3878c
|
|
BLAKE2b-256 checksum How to use checksums |
d6700d8ea47ca5f6642ef4e2c2a8c515df4c1d23e9f218b3e24843b70888f8ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1
|
Release files / sparse_list-1.0-py3-none-any.whl
| Download URL | sparse_list-1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eedc0954e915764b603abd805047974105f3da2246d95aa4a0268e5199650fda
|
|
BLAKE2b-256 checksum How to use checksums |
dddfec18692323270e7c19067d67cec6d6a87a445759a09886fa7beb8ce345fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1
|
Security for sparse-list 1.0
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.