Skip to main content

algocode

Call an algorithm by name and get its source code, an explanation, its complexity, and an optional step-by-step trace on your own data.

Built for competitive programming: grab a clean, ready-to-paste implementation in seconds, or watch how an algorithm behaves on a specific input.

Install

pip install algocode        # once published
# or, from source:
pip install .

Usage

import algocode as ac

algo = ac.get("quicksort")

print(algo.code())       # ready-to-paste source string
print(algo.explain())    # summary + complexity table
algo.trace([3, 1, 2])    # step-by-step run on your data

ac.available()           # ['bubblesort', 'insertionsort', 'mergesort', ...]

Aliases work too: ac.get("merge"), ac.get("quick_sort").

What's included

Sorting: quicksort, mergesort, bubblesort, insertionsort, selectionsort.

Roadmap

  • More algorithms: binary search, BFS/DFS, Dijkstra, DSU, sieve
  • C++ and Java code output (competitive-programming standard)
  • Optional visual trace (HTML)

License

MIT

Metadata

Release files for algocode 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for algocode 0.1.0
File Size Uploaded Provenance Actions
algocode-0.1.0.tar.gz 6.2 kB Without provenance Details for algocode-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for algocode 0.1.0
File Interpreter ABI Platform Actions
algocode-0.1.0-py3-none-any.whl Python 3 none any Details for algocode-0.1.0-py3-none-any.whl

Total release size: 12.7 kB

Release files / algocode-0.1.0.tar.gz

Download URL algocode-0.1.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c3101e402e2667c7a5db78a1ecb7b9488bb063b76cdd02106bd9cad518cce204
BLAKE2b-256 checksum
How to use checksums
8884b9a632f2390dbb6ca2d0972dc33fb28868f7f8a60a87505ddc40f0685f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release files / algocode-0.1.0-py3-none-any.whl

Download URL algocode-0.1.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
827b1c6725ca4053affbba4920059ec0f8ddf5bbf4793ef13747c879ac613de1
BLAKE2b-256 checksum
How to use checksums
17c42d91c0a15d6eebe814ec09f597ebaf1639f3df28723bd37c15d7aa9bafaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Security for algocode 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page