A semantic DSA execution engine.
Project description
๐ PyDSA Engine v0.2.0
A Semantic AI-Powered Data Structures & Algorithms Execution Engine
Search. Execute. Trace. Benchmark. Learn.
๐ What's New in v0.2.0
๐๏ธ Benchmark Engine
PyDSA Engine now includes a powerful benchmarking system.
Benchmark any supported algorithm directly from your terminal:
pydsa benchmark "two sum"
Get:
- Average Runtime
- Fastest Execution
- Slowest Execution
- Execution Statistics
- Performance Insights
Perfect for:
- Competitive Programmers
- Interview Preparation
- Performance Analysis
- DSA Learning
๐ Overview
PyDSA Engine is a next-generation Data Structures & Algorithms execution environment built for developers, students, educators, researchers, 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 combines:
- AI Semantic Search
- Dynamic Execution
- Algorithm Benchmarking
- Visual Debugging
- FastAPI Integration
- Complexity Analysis
into a single developer-friendly package.
โจ Features
๐ง AI Semantic Search
Find algorithms using natural language.
Example:
pydsa search "water container"
Automatically finds:
Container With Most Water
โก Dynamic Algorithm Execution
Execute algorithms directly from the terminal.
Supports:
- Arrays
- Strings
- Integers
- Matrices
- Graphs
- Trees
Example:
pydsa solve "two sum" "[2,7,11,15]" "9"
๐ Visual X-Ray Tracer
Watch your algorithm execute line-by-line.
Example:
pydsa solve "two sum" "[2,7,11,15]" "9" --trace
Features:
- Variable Tracking
- Execution Flow
- Step-by-Step Debugging
- Educational Learning Mode
๐๏ธ Benchmark Engine
Benchmark algorithm performance instantly.
Example:
pydsa benchmark "two sum"
Sample Output:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Benchmark Results โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Problem: Two Sum โ
โ Runs: 1000 โ
โ Avg Runtime: 0.000031 sec โ
โ Best Runtime: 0.000019 sec โ
โ Worst Runtime: 0.000064 sec โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Perfect for:
- Comparing solutions
- Optimization analysis
- Performance profiling
- Learning complexity behavior
๐ Clipboard Integration
Copy optimal solutions directly into your clipboard.
Example:
pydsa solve "two sum" --copy
Requirements:
pip install pyperclip
๐ Built-in FastAPI Server
Turn PyDSA into a backend microservice instantly.
Powered by:
- FastAPI
- OpenAPI
- Swagger UI
๐ Complexity Analysis
Every execution automatically displays:
- Time Complexity
- Space Complexity
- Difficulty
- Category
๐ Massive Algorithm Database
Includes:
- 3900+ Problems
- LeetCode Problems
- Design Problems
- Graph Problems
- Dynamic Programming
- Trees
- Linked Lists
- Advanced Data Structures
๐ฆ Installation
Install from PyPI:
pip install pydsa-engine
Verify Installation:
pydsa --help
๐ป CLI Usage
1๏ธโฃ Search Problems
Use natural language to find algorithms.
pydsa search "water container"
Example:
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 directly into your IDE.
pydsa solve "two sum" --copy
4๏ธโฃ Execute Algorithms
Run algorithms with actual inputs.
pydsa solve "two sum" "[2,7,11,15]" "9"
Output:
Result:
[0,1]
Time Complexity:
O(n)
Space Complexity:
O(n)
5๏ธโฃ X-Ray Trace Execution
Visual debugging mode.
pydsa solve "two sum" "[2,7,11,15]" "9" --trace
Example:
Line 12:
num = 2
target = 9
Line 13:
lookup = {2: 0}
6๏ธโฃ Benchmark Algorithms
Analyze algorithm performance.
pydsa benchmark "two sum"
Other examples:
pydsa benchmark "container with most water"
pydsa benchmark "merge intervals"
pydsa benchmark "longest substring without repeating characters"
๐ REST API Server
Launch FastAPI Server:
pydsa serve --port 8000
Server:
http://127.0.0.1:8000
Swagger UI:
http://127.0.0.1:8000/docs
Redoc:
http://127.0.0.1:8000/redoc
Example API Request
Endpoint
POST /solve
Request
{
"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
Current Categories:
- 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...
๐ Architecture
PyDSA Engine
โ
โโโ CLI Interface
โโโ AI Semantic Search
โโโ Vector Search Engine
โโโ Dynamic Execution Engine
โโโ Visual X-Ray Tracer
โโโ Benchmark Engine
โโโ Clipboard Manager
โโโ FastAPI Server
โโโ Complexity Analyzer
โโโ Algorithm Database (3900+)
๐ Development Setup
Clone Repository:
git clone https://github.com/Abhi112ss/pydsa.git
Move into Project:
cd pydsa
Install Editable Mode:
pip install -e .
Install Development Dependencies:
pip install pytest
โ Testing
Run Tests:
pytest
Run Coverage:
pytest --cov=pydsa
๐ค Contributing
Contributions are welcome.
Ways to contribute:
- Add Algorithms
- Improve Documentation
- Improve Search Accuracy
- Add New CLI Features
- Optimize Benchmark Engine
- Improve Tracing System
- Performance Improvements
Workflow:
fork โ feature branch โ commit โ pull request
๐ฃ Roadmap
โ v0.2.0
- AI Semantic Search
- Dynamic Execution Engine
- Visual X-Ray Tracer
- Benchmark Engine
- FastAPI REST Server
- Clipboard Integration
- Complexity Analysis
๐ Upcoming
- Visual Graph Explorer
- Interactive Tree Visualizer
- Algorithm Playground
- AI Tutor Mode
- LeetCode Sync
- Competitive Programming Assistant
- Web Dashboard
- Performance Charts
๐ License
Licensed under the MIT License.
MIT License
See the LICENSE file for details.
Built with โค๏ธ for the Python & DSA Community
PyDSA Engine โ Search. Execute. Trace. Benchmark. 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.2.0.tar.gz.
File metadata
- Download URL: pydsa_engine-0.2.0.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 |
16ceec0222c17439a18f2b1eac906059bbbfc4387d83e637e7ce4ccb93813ffe
|
|
| MD5 |
d641af8e862a74271312f844b5ed3792
|
|
| BLAKE2b-256 |
93a9a0b013e984bb88449efa419c73e9f341c9beb7737e442f2a6e6cda529a2b
|
File details
Details for the file pydsa_engine-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pydsa_engine-0.2.0-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 |
cdd7254ec0872022d9c54d23e28d3d1ca68f8c3440b286b5e3209d3e91941217
|
|
| MD5 |
71ca47af8abc6a13ca82fee48f7026a2
|
|
| BLAKE2b-256 |
a006f8d37e6f42e20ef349f2a1ccfce721f5de7e17beff98be6d4492f9faa892
|