Skip to main content

A Python algorithms module for learning

Project description


Pygorithm
=========

.. image:: https://readthedocs.org/projects/pygorithm/badge/?version=latest
:target: http://pygorithm.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://img.shields.io/badge/Python-3.6-brightgreen.svg
:target: https://github.com/OmkarPathak/pygorithm
:alt: Python 3.6

| A Python module to learn all the major algorithms on the go!
| Purely for educational purposes

Features
~~~~~~~~

* Super easy to use
* A very easy to understand `Documentation <http://pygorithm.readthedocs.io/en/latest/>`_
* Get the code right in your editor
* Get time complexities on the go

Installation
~~~~~~~~~~~~

* Just fire the following command in your terminal:

::

pip3 install pygorithm

- | It's that easy. If you are using Python 2.7 use pip instead. Depending on your
| permissions, you might need to use ``pip install --user pygorithm`` to install.

* Or you can download the source code from `here <https://github.com/OmkarPathak/pygorithm>`_, and then just install the package using

::

python setup.py install


Quick Start Guide
~~~~~~~~~~~~~~~~~

* To sort your list

.. code:: python

from pygorithm.sorting import bubble_sort
myList = [12, 4, 3, 5, 13, 1, 17, 19, 15]
sortedList = bubble_sort.sort(myList)
print(sortedList)


* To get the code for function used

.. code:: python

from pygorithm.sorting import bubble_sort
code = bubble_sort.get_code()
print(code)


* To get the time complexity of an algorithm

.. code:: python

from pygorithm.sorting import bubble_sort
time_complexity = bubble_sort.time_complexities()
print(time_complexity)

* To see all the available functions in a module. For example, if you want to see what all sorts are available in the sorting module, then just do

.. code:: python

>>> from pygorithm.sorting import modules
>>> modules()
['bubble_sort', 'bucket_sort', 'counting_sort', 'heap_sort', 'insertion_sort', 'merge_sort', 'quick_sort', 'selection_sort', 'shell_sort']

Tests
~~~~~

* Just type in the following command to run the tests
::

python3 -m unittest

* This will run all the tests defined in the files of the ``tests/`` directory


Donation
~~~~~~~~

If you have found my softwares to be of any use to you, do consider helping me pay my internet bills. This would encourage me to create many such softwares :)

- `PayPal <https://paypal.me/omkarpathak27>`_
- `₹ (INR) <https://www.instamojo.com/@omkarpathak/>`_


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

pygorithm-1.0.2.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

pygorithm-1.0.2-py2.py3-none-any.whl (29.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pygorithm-1.0.2.tar.gz.

File metadata

  • Download URL: pygorithm-1.0.2.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pygorithm-1.0.2.tar.gz
Algorithm Hash digest
SHA256 89f9c95fce8e66b0558f848c6ad508831c384e7e91b1a79fba35badb9c1506a5
MD5 52216b72e48957d007e77b8043a47141
BLAKE2b-256 2ba5008c8d97e1d58dc10f40fc60200221585340285d2b8d5d2c115a72857104

See more details on using hashes here.

File details

Details for the file pygorithm-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pygorithm-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b74c56493292e0b23841b23fb1676b09b0a4f9370560ef6acde41b9af444c91d
MD5 80dc7ffb57a6d93297918cc6e6a005f7
BLAKE2b-256 176d3013aa05097eb72e1d28bf5a1ba47a78a3c986e20a6526359cf2c50aa7cc

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