Metadata-Version: 2.4
Name: pycorebox
Version: 0.1.4
Summary: A friendly interactive sandbox to learn and execute core algorithms from scratch.
Keywords: pycorebox,dsa,data structures,algorithms,computer science,cs,python library,developer toolkit,coding,education,learning,student,interview prep,faang,maang,sde,software engineering,coding interview,tech interview,job prep,placements,campus placement,competitive programming,leetcode,hackerrank,codeforces,codechef,tutorial,interactive learning,school,college,btech,bca,mca,beginners,start coding,coding for beginners,learn python,python basics,python3,python programming,arrays,linked list,stack,queue,deque,trees,binary tree,bst,avl tree,trie,heap,graphs,hash maps,dsu,disjoint set,segment tree,sorting,searching,recursion,dynamic programming,dp,backtracking,greedy,two pointers,bit manipulation,string matching,graph algorithms,graph traversal,bfs,dfs,topological sort,shortest path,minimum spanning tree,dijkstra,bellman ford,kruskal,prims,kmp,rabin karp,kosaraju,binary search,merge sort,quick sort,time complexity,space complexity,big o,regex,regular expressions,matrix,patterns,math,fibonacci,armstrong,sliding window
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# PyCoreBox

[![PyPI version](https://badge.fury.io/py/pycorebox.svg)](https://badge.fury.io/py/pycorebox)
[![GitHub](https://img.shields.io/badge/GitHub-Repository-blue.svg)](https://github.com/Abhisek-Dash-Official/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

Installing PyCoreBox is incredibly easy using `pip`:

```bash
pip install pycorebox
```

_Note: Requires Python 3.12+_

### For Developers (Source Installation)

If you want to contribute or modify the package locally:

```bash
git clone https://github.com/Abhisek-Dash-Official/pycorebox.git
cd pycorebox
pip install -e .
```

---

## New: Built-in Interactive Help & Level-0 Crash Course

```python
from pycorebox import Learn, Run

# 1. Absolute beginner? Get a complete, no-internet Python crash course!
Learn.scratch_basics()

# 2. Want to see all available learning modules?
Learn.help()

# 3. Want to see all available executable algorithms?
Run.help()
```

---

## 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.

```python
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()

# Modular way (Cleaner IntelliSense)
Learn.basics.check_even_odd()
```

_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.

```python
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)

# Modular way (Cleaner IntelliSense)
print(Run.recursion.factorial_recursive(5))
```

---

## What's Inside? (The Curriculum)

PyCoreBox covers a massive surface area of Computer Science, structured perfectly from Level 1 to Level 4.

> For a full, detailed list of all 100+ functions and their arguments, please check our [**API Reference Guide**](https://github.com/Abhisek-Dash-Official/pycorebox/blob/main/API_REFERENCE.md).

### 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.

```text
pycorebox/
├── src/
│ └── pycorebox/
│ ├── algorithms/
│ ├── basics/
│ ├── data_structures/
│ ├── matrix/
│ ├── patterns/
│ ├── recursion/
│ ├── regex/
│ ├── searching/
│ ├── sorting/
│ ├── utils.py
│ └── **init**.py
└── main.py
```

---

## Contributing

Contributions are welcome! Whether you are a student fixing a typo or a developer optimizing a `Run` utility:

1. Fork the repository.
2. Create your feature branch (`git checkout -b feature/NewAlgorithm`).
3. Commit your changes (`git commit -m "feat: add new algorithm"`).
4. Push to the branch (`git push origin feature/NewAlgorithm`).
5. Open a Pull Request.

## Issues & Support

Found a bug or want to request a new algorithm? Open an issue on our [GitHub Issues Page](https://github.com/Abhisek-Dash-Official/pycorebox/issues).

## MIT License

Copyright (c) 2026 Abhisek Dash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---

Happy Coding!
