This library is a collection of data structures that are not included in the Python standard library. The goal is to provide a Pythonic interface to these data structures, making them easier to use and more intuitive.
I created this library because I wanted to learn more about data structures and algorithms. I also wanted to create a library that would be useful to other Python developers. I hope that this library will help you learn more about data structures and algorithms, and that it will be useful in your own projects.
- Custom Data Structures: Implementations of data structures like heaps, tries, and graphs that are not part of the standard library.
- Pythonic Interfaces: Designed with a focus on usability and readability, following Python's idiomatic conventions.
- Efficiency: Optimized for performance with a focus on minimizing time and space complexity.
- Extensibility: Easily extendable to include new data structures or modify existing ones.
You can clone the repository and install it manually:
git clone https://github.com/nicholasadamou/databricks.git
cd databricks
python setup.py installThis library is not part of PyPI because the name databricks has already been used.
Here's a quick example of how to use one of the data structures in this library:
from databricks import Heap
# By default, the heap is a min-heap
heap = Heap[int]()
heap.insert(10)
heap.insert(5)
heap.insert(20)
print(heap.pop()) # Outputs: 5To ensure the reliability and correctness of the library, a comprehensive suite of tests is included. You can run the tests using pytest:
-
Install
pytestif you haven't already:pip install pytest
-
Run the tests:
pytest
This will find and execute all the test cases and provide a summary of the results.
This project is licensed under the MIT License. See the LICENSE file for more details.