Skip to main content

autobee 🐝

PyPI version Python 3.8+ License: MIT CI

A clean, one-line DSA toolkit for Python.
Perfect for students, interview prep, and quick prototyping.

pip install autobee

✨ Features

Every algorithm returns a clean dict with:

  • result — the final answer
  • steps — every intermediate state (great for visualization!)
  • algo — algorithm name
  • complexity — time and space complexity

🚀 Quick Start

from autobee import bubble_sort, binary_search, bfs, fibonacci, BST

# Sorting — one line
bubble_sort([5, 2, 8, 1, 9])["result"]        # → [1, 2, 5, 8, 9]

# Searching
binary_search([1, 3, 5, 7, 9], 7)["found"]    # → True
binary_search([1, 3, 5, 7, 9], 7)["result"]   # → 3 (index)

# Graphs
g = {"A": ["B", "C"], "B": ["D"], "C": [], "D": []}
bfs(g, "A")["result"]                          # → ['A', 'B', 'C', 'D']

# Dynamic Programming
fibonacci(10)["result"]                        # → 55
fibonacci(10)["steps"]                         # → [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]

# Data Structures
tree = BST()
for v in [5, 3, 7, 1, 4]: tree.insert(v)
tree.inorder()                                 # → [1, 3, 4, 5, 7]
tree.search(4)                                 # → True

📦 API Reference

Sorting

All sorting functions accept a list and return {"result", "steps", "algo", "complexity"}.

Function Best Average Worst Space Stable
bubble_sort(arr) O(n) O(n²) O(n²) O(1) ✅
insertion_sort(arr) O(n) O(n²) O(n²) O(1) ✅
selection_sort(arr) O(n²) O(n²) O(n²) O(1) ❌
merge_sort(arr) O(n log n) O(n log n) O(n log n) O(n) ✅
quick_sort(arr) O(n log n) O(n log n) O(n²) O(log n) ❌
heap_sort(arr) O(n log n) O(n log n) O(n log n) O(1) ❌
from autobee import merge_sort

r = merge_sort([38, 27, 43, 3])
r["result"]       # [3, 27, 38, 43]
r["steps"]        # [[27, 38], [3, 43], [3, 27, 38, 43], ...]
r["complexity"]   # {"time_average": "O(n log n)", "space": "O(n)"}

Searching

from autobee import binary_search, linear_search

# Binary Search (auto-sorts input)
r = binary_search([10, 3, 7, 1, 5], 7)
r["result"]   # 2  (index in sorted array)
r["found"]    # True
r["steps"]    # [{"lo": 0, "hi": 4, "mid": 2, ...}, ...]

# Linear Search (works on any list including strings)
linear_search(["apple", "bee", "cat"], "bee")["result"]   # 1

Graphs

Graphs are plain dicts. Unweighted uses [neighbors], weighted uses [(neighbor, weight)].

from autobee import bfs, dfs, dijkstra

# Unweighted graph
g = {"A": ["B", "C"], "B": ["D"], "C": ["D"], "D": []}
bfs(g, "A")["result"]   # ['A', 'B', 'C', 'D']
dfs(g, "A")["result"]   # ['A', 'B', 'D', 'C']

# Weighted graph for Dijkstra
wg = {
    "A": [("B", 1), ("C", 4)],
    "B": [("C", 2), ("D", 5)],
    "C": [("D", 1)],
    "D": []
}
dijkstra(wg, "A")["result"]   # {'A': 0, 'B': 1, 'C': 3, 'D': 4}

Dynamic Programming

from autobee import fibonacci, knapsack, lcs

# Fibonacci
fibonacci(8)["result"]   # 21
fibonacci(8)["steps"]    # [0, 1, 1, 2, 3, 5, 8, 13, 21]

# 0/1 Knapsack
knapsack(
    weights=[1, 3, 4, 5],
    values= [1, 4, 5, 7],
    capacity=7
)["result"]   # 9

# Longest Common Subsequence
lcs("ABCBDAB", "BDCAB")["result"]   # 4

Data Structures

Stack

from autobee import Stack

s = Stack()
s.push(1); s.push(2); s.push(3)
s.peek()    # 3
s.pop()     # 3
s.size()    # 2
s.to_list() # [1, 2]

Queue

from autobee import Queue

q = Queue()
q.enqueue("a"); q.enqueue("b"); q.enqueue("c")
q.dequeue()  # 'a'
q.peek()     # 'b'
q.size()     # 2

LinkedList

from autobee import LinkedList

ll = LinkedList()
ll.append(1); ll.append(2); ll.append(3)
ll.prepend(0)
ll.to_list()       # [0, 1, 2, 3]
ll.delete(2)
ll.search(3)       # True
str(ll)            # "0 -> 1 -> 3"

BST (Binary Search Tree)

from autobee import BST

tree = BST()
for v in [5, 3, 7, 1, 4, 6, 8]:
    tree.insert(v)

tree.inorder()     # [1, 3, 4, 5, 6, 7, 8]   ← sorted!
tree.preorder()    # [5, 3, 1, 4, 7, 6, 8]
tree.postorder()   # [1, 4, 3, 6, 8, 7, 5]
tree.height()      # 3
tree.search(4)     # True
tree.delete(3)
tree.to_dict()     # nested dict for visualization

🛠 Development Setup

git clone https://github.com/YOUR_USERNAME/autobee.git
cd autobee
pip install -e ".[dev]"
pytest tests/ -v

🚢 Publishing a New Version

  1. Update version in pyproject.toml
  2. Commit and push:
    git add .
    git commit -m "Release v0.2.0"
    git tag v0.2.0
    git push origin main --tags
    
  3. GitHub Actions automatically runs tests → builds → publishes to PyPI ✅

🔐 PyPI Trusted Publishing Setup (One-time)

This repo uses PyPI Trusted Publishing — no API tokens or secrets needed!

  1. Go to pypi.org → Your account → Publishing
  2. Add a new trusted publisher:
    • PyPI project name: autobee
    • Owner: YOUR_USERNAME
    • Repository: autobee
    • Workflow: publish.yml
    • Environment: pypi
  3. In your GitHub repo → Settings → Environments → create environment named pypi
  4. That's it! Push a tag and watch it publish 🎉

📄 License

MIT © autobee contributors

Metadata

Release files for autobee 0.1.0

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

Source distribution (sdist)

Source distribution for autobee 0.1.0
File Size Uploaded Provenance
autobee-0.1.0.tar.gz 13.2 kB With provenance Details

Built distribution (wheel)

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

Total release size: 25.0 kB

Release files / autobee-0.1.0.tar.gz

Download URL autobee-0.1.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f72415ca3ade84ea7a7eb5619beb54daa25caaf6a0dd7f6a14c0c99ef26e9583
BLAKE2b-256 checksum
How to use checksums
ec3baadbda6ca7d228cb7f99d184a66ff5e373668923e2b21fe6be4bbb1df6b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 5, 2026.

Transparency log

Release files / autobee-0.1.0-py3-none-any.whl

Download URL autobee-0.1.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e602317f403f669fa41c3aef1894625993431697f05c557850b1110c44921298
BLAKE2b-256 checksum
How to use checksums
bf4abe6869bc94614fae004b55d176912a70fb94a3c7defca5be939ac0c0ecf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 5, 2026.

Transparency log

Security for autobee 0.1.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for autobee-0.1.0.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 Mar 5, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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