A semantic DSA execution engine.
Project description
๐ PyDSA Engine
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd01e37f57b59e28888bc0d0126d41347776370ace3cf4add3d9cb0b8de20fbf
|
|
| MD5 |
073d8cf0ee0915be852da9cf0b39932a
|
|
| BLAKE2b-256 |
b4e10ca0a0fdc430cd77c2b6cdc277e5385a0e4f2d9ede83399bde97a63fc73f
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87265a3a2ab4dd7f7cc329785635ed0d80121a07db85f4ad10448ae541e5f7cf
|
|
| MD5 |
5ce9c14830af882b8043d089b9e87b81
|
|
| BLAKE2b-256 |
3ce1430194c4a866d2dfa752760def837ff5cc54e58a420b11fecf44c35d796b
|