🚀 PyDSA Engine v0.2.1
A Semantic AI-Powered Data Structures & Algorithms Execution Engine
Search. Execute. Trace. Benchmark. Learn.
🎉 What's New in v0.2.1
🏎️ Benchmark Engine
PyDSA Engine now includes a powerful benchmarking system and improved the API Server.
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"
🌐 Improved 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.1
- 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.
Metadata
Release files for pydsa-engine 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydsa_engine-0.2.1.tar.gz | 8.7 MB | Without provenance | Details for pydsa_engine-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydsa_engine-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for pydsa_engine-0.2.1-py3-none-any.whl |
Total release size: 19.6 MB
Release files / pydsa_engine-0.2.1.tar.gz
| Download URL | pydsa_engine-0.2.1.tar.gz |
|---|---|
| Size | 8.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52da99dc3bcf4c0045b3403e859f4ee4f45303c7a2000da0926440030b6c4178
|
|
BLAKE2b-256 checksum How to use checksums |
10eb3c264421b4eabffcb31a2960d3da7aa4a82b6cc0c9af737c5e2563131f1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / pydsa_engine-0.2.1-py3-none-any.whl
| Download URL | pydsa_engine-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4371f3798229b6b9c68d866d95b4f3e15880db08137a369b793eef9862fd8a0
|
|
BLAKE2b-256 checksum How to use checksums |
92d5473e21036e294bdeef62f10bf1216245c0875d58a3448ab8892d37a89c2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for pydsa-engine 0.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.