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 — 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

  • 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.1

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.1
File Size Uploaded
core_data_structures-1.4.1.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for core-data-structures 1.4.1
File Interpreter ABI Platform
core_data_structures-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.9 kB

Release files / core_data_structures-1.4.1.tar.gz

Download URL core_data_structures-1.4.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
adc5b8e7a687bb76fbbf6b9f7d795aa37d2a1984f105ca8681bf3d867901a328
BLAKE2b-256 checksum
How to use checksums
d38bc09bcc95dffadf0b4f413355c9b41e0767c6b7829c6e1ca52fac41d90dd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / core_data_structures-1.4.1-py3-none-any.whl

Download URL core_data_structures-1.4.1-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0abacab3c04b3578375d1647927b0ddb13091fa74bf6757a14c4ddc9164fe3ff
BLAKE2b-256 checksum
How to use checksums
a9b46d183fe3be2a944011ad53637b4c980c681ed2835e84fa3abf34c22d2e2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.0

1 release file

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