Skip to main content

core-data-structures

A Python library providing common data structures including graphs, trees, and lists, with built-in traversal, path-finding, and search algorithms.


PyPI Downloads Python Versions License Pipeline Status Docs Status Security

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

  1. Install required libraries:

pip install --upgrade pip
pip install virtualenv
  1. Create Python virtual environment:

virtualenv --python=python3.12 .venv
  1. Activate the virtual environment:

source .venv/bin/activate
  1. 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:

  1. Fork the repository

  2. Create a feature branch

  3. Write tests for new functionality

  4. Ensure all tests pass: python manager.py run-tests

  5. Run linting: pylint data_structures

  6. Run security checks: bandit -r data_structures

  7. Submit a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For questions or support, please open an issue on GitLab or contact the maintainers.

Authors

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)

Source distribution for core-data-structures 1.4.2
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)

Table of built distributions (wheels) for core-data-structures 1.4.2
File Interpreter ABI Platform Actions
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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page