A friendly interactive sandbox to learn and execute core algorithms from scratch.
Project description
📦 PyCoreBox
The ultimate interactive Python library that takes you from absolute beginner (School-level basics) to advanced Developer (FAANG-level DSA). Stop searching for code snippets. Start learning directly in your terminal!
The Problem vs. The PyCoreBox Solution
❌ Way 1: The Old Way (Time Wasting)
You are a student learning Python. You forget how to write the code for a Fibonacci sequence, an Armstrong number, or a Merge Sort. You open Google, search AI prompts, read through 5 different blogs, copy the code to VSCode, and try to piece together the explanation and time complexity. You write it in a physical notebook and lose it later.
✅ Way 2: The PyCoreBox Way (Instant Learning)
You open your Python terminal or script. You import PyCoreBox.
You type Learn.fibonacci_sequence().
Instantly, the complete, pristine source code is printed to your screen, along with a detailed explanation and its Time/Space complexity.
No context switching. No Googling. Just pure, immediate learning.
Installation
You can install PyCoreBox directly from the source:
git clone [https://github.com/Abhisek-Dash-Official/pycorebox.git](https://github.com/Abhisek-Dash-Official/pycorebox.git)
cd pycorebox
pip install -e .
Note: Requires Python 3.12+
How It Works: The Two Pillars
PyCoreBox is unified under two powerful interfaces: Learn (for students) and Run (for developers).
1. The Learn Interface (Your Interactive Textbook)
Just want to see how an algorithm is written from scratch? Use the Learn class.
from pycorebox import Learn
# Forgot school-level basics?
Learn.swap_variables()
Learn.check_armstrong_num()
Learn.factorial()
# Need to practice printing patterns?
Learn.butterfly()
Learn.hollow_square()
# Preparing for Data Structures & Algorithms?
Learn.binary_search()
Learn.avl_tree_operations()
Learn.dijkstra_algorithm()
Output will cleanly display the Title, Source Code, Detailed Explanation, and Time/Space Complexity right in your console!
2. The Run Interface (Your Developer Toolkit)
Want to actually execute these algorithms on your own data without rewriting the boilerplate? Use the Run class.
from pycorebox import Run
# Example: Execute optimal Graph Traversal using PyCoreBox Generators
graph = {'A': ['B', 'C'], 'B': ['D'], 'C': [], 'D': []}
for node in Run.dfs(graph, 'A'):
print(node)
What's Inside? (The Curriculum)
PyCoreBox covers a massive surface area of Computer Science, structured perfectly from Level 1 to Level 4.
Level 1: The Absolute Basics & Patterns
- Basics:
fibonacci_sequence,check_armstrong_num,check_palindrome_num,swap_variables,find_gcd,check_leap_year,find_first_max, etc. - Patterns:
solid_square,half_pyramid,diamond,butterfly,number_palindromic_triangle,alphabet_half_pyramid, etc.
Level 2: Intermediate Concepts
- Searching:
linear_search,binary_search,jump_search,ternary_search,linked_list_search, etc. - Sorting:
bubble_sort,selection_sort,insertion_sort,merge_sort,quick_sort,heap_sort, and Linked List variants. - Recursion:
factorial_recursive,fibonacci_recursive,tower_of_hanoi_recursive,generate_subsets_recursive, etc. - Regex:
regex_basics,validate_email,extract_urls,validate_password,sanitize_text, etc.
Level 3: Core Data Structures
- Linear DS:
array_operations,stack_operations,queue_operations,deque_operations,linked_list_operations. - Trees & Graphs:
binary_tree_operations,bst_operations,avl_tree_operations,trie_operations,graph_operations. - Advanced DS:
segment_tree_operations,heap_operations,lru_cache_operations,disjoint_set_union.
Level 4: Advanced Algorithms (FAANG Level)
- Graph Algos:
dijkstra_algorithm,bellman_ford_algorithm,floyd_warshall_algorithm,prims_algorithm,kruskals_algorithm,kosarajus_algorithm. - String & Array Algos:
kmp_algorithm,rabin_karp_algorithm,quickselect_algorithm. - Tree Algos:
morris_traversal.
Project Architecture
PyCoreBox is strictly typed, OOP-driven, and highly modular.
pycorebox/
├── src/
│ └── pycorebox/
│ ├── algorithms/ # Dijkstra, KMP, Kruskal's...
│ ├── basics/ # Fibonacci, Armstrong, Swap...
│ ├── data_structures/ # Trees, Graphs, Hash Maps...
│ ├── matrix/ # 2D arrays, Rotations...
│ ├── patterns/ # Pyramids, Diamonds, Butterfly...
│ ├── recursion/ # Tower of Hanoi, Subsets...
│ ├── regex/ # Validation, Extraction...
│ ├── searching/ # Binary, Ternary, Jump...
│ ├── sorting/ # Merge, Quick, Heap...
│ ├── utils.py # Code printer engine
│ └── __init__.py # Unified Learn and Run exports
└── main.py
Contributing
Contributions are welcome! Whether you are a student fixing a typo or a developer optimizing a Run utility:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/NewAlgorithm). - Commit your changes (`git commit -m ```feat: add new algorithm````).
- Push to the branch (
git push origin feature/NewAlgorithm). - Open a Pull Request.
Happy Coding!
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
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 pycorebox-0.1.0.tar.gz.
File metadata
- Download URL: pycorebox-0.1.0.tar.gz
- Upload date:
- Size: 57.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccdb5934182a337c02cdc3356d98fdb3bf1328c60fd5077244d3ac040acfc8a5
|
|
| MD5 |
119338238a7074cd3647b6f1e1c42655
|
|
| BLAKE2b-256 |
6475615c456868b4090f1c56a7ca2ed8dc58497c6c5abd17661e1f59b60d2299
|
File details
Details for the file pycorebox-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pycorebox-0.1.0-py3-none-any.whl
- Upload date:
- Size: 64.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f699897bb3dab4596f822eb500bfdb5e0df42ea0ddf6de3c1c597e59efdb7da
|
|
| MD5 |
85e0b643a50fa0e2c81b452955195b53
|
|
| BLAKE2b-256 |
6b8ba6c7bbcafcd0703497bca5f9f026a495a66abec312097171b5744e024f65
|