py-data-structures
Python implementation of abstract data structures
Install
pip install py-data-structures
Data Structures Covered:
Stack
Usage
from data_structures import Stack
stack = Stack()
stack.push(item) # push an item in stack
stack.pop() # returns and removes the top item from the stack
stack.length # contains the length of the stack
stack.top # contains the top item of the stack
stack.iterate() # override to iterate or perform action on the stack elements
Exceptions
from data_structures import exceptions
# raised on pop() or top when stack is empty
exceptions.EmptyStackException
Queue
Usage
from data_structures import Queue
queue = Queue()
queue.enqueue(item) # add an item at the end of queue
queue.dequeue() # returns and removes the first item from the queue
queue.length # contains the length of the queue
queue.first_item # contains the first item in the queue
queue.last_item # contains the last item in the queue
queue.iterate() # override to iterate or perform action on the queue elements
Exceptions
from data_structures import exceptions
# raised on dequeue(), first_item or last_item when queue is empty
exceptions.EmptyQueueException
Metadata
Release files for py-data-structures 0.2.1
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 | |
|---|---|---|---|---|
| py-data-structures-0.2.1.tar.gz | 3.2 kB | Without provenance | Details |
Release files / py-data-structures-0.2.1.tar.gz
| Download URL | py-data-structures-0.2.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fb4c8d6e7fc0a7233db61afde2094ce6842c7ec16d16b02901186007c033cf5
|
|
BLAKE2b-256 checksum How to use checksums |
7a8adb4730fa6c52d3df71ba02faabf0d88cea10090529cdde9ee6e2d3ea0227
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.2
|
Security for py-data-structures 0.2.1
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.