Skip to main content

Python Version PyPI-Server Project generated with PyScaffold Documentation Status Coverage Status License

logo

🛞 mywheel

High-performance data structures and algorithms in Python

mywheel provides efficient implementations of fundamental data structures optimized for specific use cases in graph algorithms, EDA (Electronic Design Automation), and network optimization. All implementations prioritize memory efficiency and time complexity over Python's standard library alternatives.

🚀 Quick Start

Installation

pip install mywheel

Usage Examples

Doubly Linked List with O(1) Operations

from mywheel import Dllist, Dllink

# Create list
dlist = Dllist(0)  # sentinel node
dlist.append(Dllink("A"))
dlist.append(Dllink("B"))

# O(1) operations
node = dlist.popleft()  # Remove first
dlist.appendleft(Dllink("C"))  # Add to front

Bounded Priority Queue for Small Integer Keys

from mywheel import BPQueue, Dllink

# Efficient for keys in range [-5, 5]
bpq = BPQueue(-5, 5)

# Add items with integer keys
bpq.append(Dllink("task1"), 3)
bpq.append(Dllink("task2"), 5)

# Extract highest priority item
item = bpq.popleft()

Round-Robin Iteration

from mywheel import Robin

# Create 5-part cycle
robin = Robin(5)

# Iterate excluding starting position
for part in robin.exclude(2):
    print(part)  # Prints: 3, 4, 0, 1

Array-Like Utilities

from mywheel import MapAdapter

# Adapt list to dict-like interface
lst = [10, 20, 30, 40]
mapping = MapAdapter(lst)

mapping[0] = 99
assert mapping[0] == 99

📊 Performance Characteristics

Data Structure Insert Delete Lookup Memory Best For
Dllist O(1) O(1) N/A Minimal Frequent front/back operations
BPQueue O(1)* O(k) O(1) O(b-a) Small bounded integer keys
Robin O(n) N/A O(1) O(n) Round-robin scheduling
MapAdapter O(1) N/A O(1) O(n) Dict-like list access

* O(1) amortized for bounded keys

🎯 Used In

  • digraphx - Graph algorithms and data structures
  • netlistx - VLSI netlist partitioning
  • ckpttnpy - Multi-level circuit partitioning

✨ Features

  • Memory Efficient: Uses __slots__ and sentinel nodes to minimize overhead
  • Type Safe: Full type hints with mypy support
  • Well Tested: 100% coverage with pytest and hypothesis
  • Zero Dependencies: Pure Python, no external runtime dependencies
  • Python 3.8+: Supports all modern Python versions

🔧 Development

# Clone and install
git clone https://github.com/luk036/mywheel.git
cd mywheel
pip install -e ".[testing]"

# Run tests
pytest

# Run type checking
mypy src/mywheel

# Run linting
pre-commit run --all-files

See CONTRIBUTING.md for detailed guidelines.

👉 Note

This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.

Metadata

Release files for mywheel 0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mywheel 0.8
File Size Uploaded Provenance Actions
mywheel-0.8.tar.gz 77.3 kB With provenance Details for mywheel-0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mywheel 0.8
File Interpreter ABI Platform Actions
mywheel-0.8-py3-none-any.whl Python 3 none any Details for mywheel-0.8-py3-none-any.whl

Total release size: 92.0 kB

Release files / mywheel-0.8.tar.gz

Download URL mywheel-0.8.tar.gz
Size 77.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7a46ed43a0625fe1b44f632d666a2f462e8d992ec28e431fba67f6636faa2223
BLAKE2b-256 checksum
How to use checksums
627d670e4a08ff12ea4f77db7e318c7b875260f090a506f1c6db951024ffcf0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / mywheel-0.8-py3-none-any.whl

Download URL mywheel-0.8-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49c3bf01791e549b3189b48d6c1a55951c30c4509ea110007f3c65aefecb7a2f
BLAKE2b-256 checksum
How to use checksums
4d495be15a84c10d9e96038f7a93f196b9e81370a0fb023751a83a26bd12263e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for mywheel 0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mywheel-0.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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