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.


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

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.1.tar.gz (10.1 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.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file core_data_structures-1.2.1.tar.gz.

File metadata

  • Download URL: core_data_structures-1.2.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for core_data_structures-1.2.1.tar.gz
Algorithm Hash digest
SHA256 156746a341bd26a42b0f17033a447bf85a90026353dca44111438707afc1cab9
MD5 f86eb743979533b0454dee04260422cf
BLAKE2b-256 6aab2f391d74bc68538b27af547e60fc247c79162e010c192453dd42a13c4b8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for core_data_structures-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82d65649aec65b974111bb35d449c12cc3ef742cb11d9884fea52b0f0ff7d83e
MD5 d7572791ec33d677024f4800e12ab76a
BLAKE2b-256 f5134d6fa42274aaafbbed08f7583e1e3a6bcb814e0354f8cda8489155f7cd70

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