Skip to main content

A strictly typed, 100% test-covered data structures and algorithms library.

Project description

pure-python-ds 🚀

A strictly-typed, 100% test-covered, and benchmarked Data Structures & Algorithms library.

Python Version License: MIT Tests

🏗️ Architecture & Engineering

This library is engineered for Systems Architects and developers who require predictable performance and strict type safety. Every structure is built using Python's __slots__ to ensure a minimal memory footprint and high-speed attribute access.

[Image of a software architecture diagram showing layers of data structures and algorithms]

🛡️ Technical Milestones

  • 100% Test Coverage: Verified 100% line coverage across the entire core library using pytest and coverage.py.
  • Performance Benchmarked: Custom AVL Tree implementation demonstrated search operations up to 436x faster than standard Python list lookups in large-scale datasets.
  • Type Safety: 100% mypy compliance with strict type hinting for all inputs and return values.

🛠️ Key Features

1. Linear Structures

  • Linked Lists: Singly and Doubly Linked Lists with $O(1)$ head/tail operations.
  • Stacks & Queues: Built on optimized nodes for strict LIFO/FIFO behavior.
  • Hash Tables: Linear probing implementation with dynamic resizing.

2. Hierarchical & Network Structures

  • AVL Trees: Self-balancing trees with rotation logic guaranteeing $O(\log n)$ performance.
  • Red-Black Trees: Memory-optimized nodes with $O(\log n)$ height guarantees.
  • Graphs: Adjacency-list based supporting Dijkstra’s, Bellman-Ford, Kruskal’s (via custom DSU), Prim's, A* Search, BFS, and DFS.
  • Bloom Filters: Space-efficient probabilistic bit-array structures.

3. Advanced Data Structures

  • Segment Trees: Range Query/Point Update in $O(\log n)$.
  • Tries: Space-efficient prefix trees for string operations.
  • Heaps & Priority Queues: Min/Max Binary Heaps and native PriorityQueue wrappers for $O(1)$ optimal access.
  • LRU Caches: Optimized $O(1)$ mapping mapping backed by Doubly Linked Lists.

4. Algorithms Module (New in v1.1.0!)

  • Sorting: Quick Sort, Heap Sort, Merge Sort, Insertion Sort, and Radix Sort.
  • Searching: Binary, Linear, Jump, and Exponential Search.
  • Dynamic Programming: 0-1 Knapsack, LCS, LIS, Edit Distance, and Memoized Fibonacci.
  • String Matching: Knuth-Morris-Pratt (KMP) & Rabin-Karp implementations.

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

pure_python_ds-1.1.0.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

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

pure_python_ds-1.1.0-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file pure_python_ds-1.1.0.tar.gz.

File metadata

  • Download URL: pure_python_ds-1.1.0.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pure_python_ds-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c6039b1310c1c628660b7309468781d55fa101ad99c015c3efdf649d0fb6f590
MD5 f969eae24604c56fd0471f2acdf1541f
BLAKE2b-256 32affb0a8f80b00a218f128790b5b6ee59a2dc3e11018c061d834ea142d53e45

See more details on using hashes here.

File details

Details for the file pure_python_ds-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pure_python_ds-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pure_python_ds-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a72492465b77db4143308ea5a7344ca030ef3c28e31e8d4b3c70a38a6cbe70a
MD5 e30e61dad68f0ac54f5607a3e645307b
BLAKE2b-256 c214d90e63f33b78fe74d5381f1da49872f9ba366739a187148d7bcc880f1184

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