core-data-structures
A Python library providing common data structures including graphs, trees, and lists, with built-in traversal, path-finding, and search algorithms.
Features
Graphs — directed weighted graph with adjacency dictionary representation.
Breadth-first search (BFS)
Depth-first search (DFS)
Path finding (single path, all paths, shortest path)
Trees — binary tree and simple nested-dictionary tree.
Pre-order, in-order, post-order, and level-order traversal
Recursive and iterative variants
Tree depth calculation
Lists — singly and doubly linked lists sharing a common IList/ILinkedList interface.
Value-based CRUD: append, prepend, insert, get/__getitem__, index, pop/pop_front/pop_back, remove (single or all occurrences)
reverse, extend, clear, to_list/from_list
__iter__/__contains__ support, plus O(1) head/end node access
DoubleLinkedList additionally maintains .prev links for backward traversal and locates positions from whichever end (head/end) is closer
Quick Start
Installation
Install from PyPI using pip:
pip install core-data-structures
uv pip install core-data-structures # Or using UV...
pip install -e ".[dev]" # For development...
Setting Up Environment
Install required libraries:
pip install --upgrade pip
pip install virtualenv
Create Python virtual environment:
virtualenv --python=python3.12 .venv
Activate the virtual environment:
source .venv/bin/activate
Install packages:
pip install .
pip install -e ".[dev]"
Check tests and coverage
python manager.py run-tests
python manager.py run-coverage
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Write tests for new functionality
Ensure all tests pass: python manager.py run-tests
Run linting: pylint data_structures
Run security checks: bandit -r data_structures
Submit a pull request
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
Documentation: https://core-data-structures.readthedocs.io/en/latest/
Repository: https://gitlab.com/bytecode-solutions/core/core-data-structures
Issues: https://gitlab.com/bytecode-solutions/core/core-data-structures/-/issues
Changelog: https://gitlab.com/bytecode-solutions/core/core-data-structures/-/blob/master/CHANGELOG.md
Support
For questions or support, please open an issue on GitLab or contact the maintainers.
Metadata
Release files for core-data-structures 1.4.2
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 |
|---|---|---|---|---|
| core_data_structures-1.4.2.tar.gz | 12.2 kB | Without provenance | Details for core_data_structures-1.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| core_data_structures-1.4.2-py3-none-any.whl | Python 3 | none | any | Details for core_data_structures-1.4.2-py3-none-any.whl |
Total release size: 28.3 kB
Release files / core_data_structures-1.4.2.tar.gz
| Download URL | core_data_structures-1.4.2.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
409992a9deeafd7422e33102cfebe4988e61476d9de170a63bed939aec010eb9
|
|
BLAKE2b-256 checksum How to use checksums |
171ba3dc4bad31e1d37da65d15f34e243ee2b925449361bc47801953d8829c6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Release files / core_data_structures-1.4.2-py3-none-any.whl
| Download URL | core_data_structures-1.4.2-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9046db13c3d568c92864ecfbb8b34038fe239029d9452bf1f39a2092062f3194
|
|
BLAKE2b-256 checksum How to use checksums |
d2e4c42ffa4c5651eee2376694e07556be0d779c7e083d89364b8e9df3707bb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Security for core-data-structures 1.4.2
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.