Skip to main content

A friendly interactive sandbox to learn and execute core algorithms from scratch.

Project description

PyCoreBox

PyPI version GitHub

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:

pip install pycorebox

Note: Requires Python 3.12+

For Developers (Source Installation)

If you want to contribute or modify the package locally:

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

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

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.

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.

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.

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/
│ ├── 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.

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!

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

pycorebox-0.1.3.tar.gz (67.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycorebox-0.1.3-py3-none-any.whl (73.3 kB view details)

Uploaded Python 3

File details

Details for the file pycorebox-0.1.3.tar.gz.

File metadata

  • Download URL: pycorebox-0.1.3.tar.gz
  • Upload date:
  • Size: 67.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.5

File hashes

Hashes for pycorebox-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6cb78a531914f3fd648f067c6727eaf1acb1907dc1c2b9eaba20615b1218a811
MD5 c85ba73d70b93b2cea0b41ade26450e5
BLAKE2b-256 847a2a0dca9a37a66ef6fd1d32cbdf8b941d77ecaea06e5c58f1c6697ce36cf9

See more details on using hashes here.

File details

Details for the file pycorebox-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pycorebox-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.5

File hashes

Hashes for pycorebox-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 51a942f327cae1a0be0357713417125853fdb6d676169f917a83947181cffb2d
MD5 e4eff7f652d277ee0e1f5e2512a32854
BLAKE2b-256 c181052cf1da2073b8c5399746ee037f97c7d04a20961a80c7ea15d8009aed17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page