Skip to main content

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.


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

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

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

core_data_structures-1.2.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

core_data_structures-1.2.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

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

Hashes for core_data_structures-1.2.0.tar.gz
Algorithm Hash digest
SHA256 f289ae64c647ff0169973cfdd4c58fc7f94ac7b96726279f72c2bf50cb7eeffe
MD5 1a778356618c8c7c41697e9bc5d771a9
BLAKE2b-256 058fe66b55b75da057de1644b1ceb192e1f8bf759626fa2995aa59adbd9f0bae

See more details on using hashes here.

File details

Details for the file core_data_structures-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for core_data_structures-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0bbe3b0980f580f9365805c2aafcd7f548578530f4c1fcf2147be88de1a6ce9
MD5 fc198acc859877e7155ee5c41ac54bb2
BLAKE2b-256 209a716b2c58e807f739666fa7fdb103cc17fb8b4d930509d1df45e98391e684

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page