Skip to main content

A semantic DSA execution engine.

Project description

๐Ÿš€ PyDSA Engine

PyPI Version Python Build License

A Semantic AI-Powered Data Structures & Algorithms Execution Engine


๐ŸŒŸ Overview

PyDSA Engine is a next-generation Data Structures and Algorithms execution environment designed for developers, students, educators, and AI applications.

Instead of remembering exact problem names, simply describe what you're looking for and let the AI-powered routing engine find the correct algorithm instantly.

PyDSA Engine includes:

  • ๐Ÿง  AI Semantic Search
  • โšก Dynamic Algorithm Execution
  • ๐Ÿ” Visual X-Ray Tracer
  • ๐Ÿ“‹ Clipboard Integration
  • ๐ŸŒ Built-in FastAPI Server
  • ๐Ÿ“š 3900+ Algorithm Database
  • ๐Ÿ“ˆ Complexity Analysis
  • ๐ŸŽฏ Natural Language Problem Routing

โœจ Features

๐Ÿง  AI Vector Routing

Find algorithms using natural language.

Example:

"water container"

Automatically routes to:

Container With Most Water


โšก Dynamic Execution

Execute algorithms directly from the terminal with real inputs.

Supports:

  • Arrays
  • Strings
  • Integers
  • Matrices
  • Graph Inputs
  • Trees

๐Ÿ” X-Ray Visual Tracer

Watch your algorithm execute step-by-step.

Features:

  • Local variable tracking
  • Execution flow visualization
  • Debugging support
  • Educational learning mode

๐ŸŒ Built-in REST API

Turn PyDSA into a backend microservice instantly.

Powered by:

  • FastAPI
  • Swagger UI
  • OpenAPI

๐Ÿ“‹ Clipboard Integration

Copy optimal solutions directly into your IDE.


๐Ÿ“ฆ Installation

Install globally from PyPI:

pip install pydsa-engine

Verify installation:

pydsa --help

๐Ÿ’ป CLI Usage

1๏ธโƒฃ Search For A Problem

Use natural language to find algorithms.

pydsa search "water container"

Example Output:

Found:
Container With Most Water
Difficulty: Medium
Category: Two Pointers

2๏ธโƒฃ View Source Code

Display the optimal implementation.

pydsa solve "max water" --show-code

3๏ธโƒฃ Copy Source Code

Copy the implementation directly to your clipboard.

pydsa solve "two sum" --copy

Requirements:

pip install pyperclip

4๏ธโƒฃ Execute An Algorithm

Pass actual inputs directly.

Example:

pydsa solve "two sum" "[2,7,11,15]" "9"

Output:

Result:
[0,1]

Time Complexity:
O(n)

Space Complexity:
O(n)

5๏ธโƒฃ Visual X-Ray Tracing

Watch execution step-by-step.

pydsa solve "two sum" "[2,7,11,15]" "9" --trace

Example Output:

Line 12:
num = 2
target = 9

Line 13:
lookup = {2:0}

Perfect for:

  • Learning DSA
  • Debugging
  • Interview Preparation

๐ŸŒ REST API Server

PyDSA includes a production-ready FastAPI backend.

Start server:

pydsa serve --port 8000

Server:

http://127.0.0.1:8000

Swagger Docs:

http://127.0.0.1:8000/docs

Redoc:

http://127.0.0.1:8000/redoc

Example API Request

Endpoint

POST /solve

Request Body

{
  "query": "two sum",
  "inputs": [
    [2,7,11,15],
    9
  ],
  "trace": true
}

Response

{
  "result": [0,1],
  "time_complexity": "O(n)",
  "space_complexity": "O(n)"
}

๐Ÿ“š Supported Categories

PyDSA Engine currently supports:

  • Arrays
  • Strings
  • Linked Lists
  • Trees
  • Binary Trees
  • Binary Search Trees
  • Graphs
  • Dynamic Programming
  • Greedy Algorithms
  • Backtracking
  • Recursion
  • Sliding Window
  • Two Pointers
  • Hash Tables
  • Heaps
  • Queues
  • Stacks
  • Tries
  • Design Problems
  • Math
  • Bit Manipulation

And many more.


๐Ÿ— Project Architecture

PyDSA Engine
โ”‚
โ”œโ”€โ”€ CLI
โ”œโ”€โ”€ AI Semantic Search
โ”œโ”€โ”€ Vector Database
โ”œโ”€โ”€ Execution Engine
โ”œโ”€โ”€ Visual Tracer
โ”œโ”€โ”€ FastAPI Server
โ”œโ”€โ”€ Complexity Analyzer
โ””โ”€โ”€ Algorithm Database (3900+)

๐Ÿ›  Development Setup

Clone repository:

git clone https://github.com/YOUR_USERNAME/pydsa.git

Move into project:

cd pydsa

Install editable mode:

pip install -e .

Install testing dependencies:

pip install pytest

โœ… Run Tests

Execute the full test suite:

pytest

Run with coverage:

pytest --cov=pydsa

๐Ÿค Contributing

Contributions are welcome.

You can contribute:

  • New algorithms
  • Bug fixes
  • Documentation
  • New CLI features
  • Performance improvements
  • AI routing enhancements

Workflow:

fork โ†’ feature branch โ†’ commit โ†’ pull request

๐Ÿ“ˆ Roadmap

v1

  • AI Semantic Search
  • Execution Engine
  • FastAPI Server
  • X-Ray Tracer

v2

  • Visual Graph Explorer
  • Interactive Tree Renderer
  • Algorithm Benchmarking
  • Web Playground

v3

  • AI Tutor Mode
  • LeetCode Importer
  • Competitive Programming Assistant
  • Algorithm Recommendation Engine

๐Ÿ“„ License

Licensed under the MIT License.

See:

LICENSE

for details.


Built with โค๏ธ for the Python & DSA Community

PyDSA Engine โ€” Search. Execute. Learn.

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

pydsa_engine-0.1.1.tar.gz (8.7 MB view details)

Uploaded Source

Built Distribution

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

pydsa_engine-0.1.1-py3-none-any.whl (10.8 MB view details)

Uploaded Python 3

File details

Details for the file pydsa_engine-0.1.1.tar.gz.

File metadata

  • Download URL: pydsa_engine-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for pydsa_engine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dd01e37f57b59e28888bc0d0126d41347776370ace3cf4add3d9cb0b8de20fbf
MD5 073d8cf0ee0915be852da9cf0b39932a
BLAKE2b-256 b4e10ca0a0fdc430cd77c2b6cdc277e5385a0e4f2d9ede83399bde97a63fc73f

See more details on using hashes here.

File details

Details for the file pydsa_engine-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pydsa_engine-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for pydsa_engine-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 87265a3a2ab4dd7f7cc329785635ed0d80121a07db85f4ad10448ae541e5f7cf
MD5 5ce9c14830af882b8043d089b9e87b81
BLAKE2b-256 3ce1430194c4a866d2dfa752760def837ff5cc54e58a420b11fecf44c35d796b

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