This project/library contains commons data structures...
Project description
core-data-structures
A Python library providing common data structures including graphs and trees, with built-in traversal and path-finding algorithms.
Features
Graphs — undirected 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
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file core_data_structures-1.2.0.tar.gz.
File metadata
- Download URL: core_data_structures-1.2.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f289ae64c647ff0169973cfdd4c58fc7f94ac7b96726279f72c2bf50cb7eeffe
|
|
| MD5 |
1a778356618c8c7c41697e9bc5d771a9
|
|
| BLAKE2b-256 |
058fe66b55b75da057de1644b1ceb192e1f8bf759626fa2995aa59adbd9f0bae
|
File details
Details for the file core_data_structures-1.2.0-py3-none-any.whl.
File metadata
- Download URL: core_data_structures-1.2.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0bbe3b0980f580f9365805c2aafcd7f548578530f4c1fcf2147be88de1a6ce9
|
|
| MD5 |
fc198acc859877e7155ee5c41ac54bb2
|
|
| BLAKE2b-256 |
209a716b2c58e807f739666fa7fdb103cc17fb8b4d930509d1df45e98391e684
|