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 .

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/
│ ├── 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.1.tar.gz (58.9 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.1-py3-none-any.whl (65.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycorebox-0.1.1.tar.gz
  • Upload date:
  • Size: 58.9 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.1.tar.gz
Algorithm Hash digest
SHA256 cecf266e73c2e4eda002bad5cde50a63995d81dcc29bd0c4726fcda477e23633
MD5 c9c9ec2f8aa760fde94e431e8dcddfbc
BLAKE2b-256 04e03cd5b4a57090e6e805e89e1316679d7a83d04ae4805d0c7aa432dd4665cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycorebox-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 65.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18fe810c17114fe4ce6a34c5a9bbd49382d9846089ce4f4313d159cb82ca1022
MD5 167bd8bfc07b8c033f4d5ff334d14806
BLAKE2b-256 3eef066b90dbdfa1bd9730ed862def0688e57c6d296a9e4d03f0159c6fe7e53a

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