Metadata-Version: 2.1
Name: alkh
Version: 0.3.0
Summary: algorithmic python debugging
Home-page: https://github.com/erez-aharonov/alkh
Author: Erez Aharonov
Author-email: ahar.erez@gmail.com
License: Apache License 2.0
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.7.2
Description-Content-Type: text/markdown
Requires-Dist: numpy (>=1.16.6)
Requires-Dist: pandas (>=0.25.0)
Requires-Dist: nbformat (>=5.1.3)
Requires-Dist: streamlit (>=1.12.0)
Requires-Dist: libcst (>=0.4.7)
Requires-Dist: networkx (>=2.5.1)

# alkh [al-khwarizmi]
### Algorithmic python debugging
### 1. [Convert your debugger stack to jupyter notebook](#convert-your-debugger-stack-to-jupyter-notebook)
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/take-it-offline-5.png?raw=true)
### 2. [Focus on code pathways using local web application](#focus-on-code-pathways-using-local-web-application)
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/analyze-2.png?raw=true)


## Installation
pip install alkh

## Convert your debugger stack to jupyter notebook

### API

function name: take_it_offline

description: create jupyter notebook based on the program stack 

parameters:

notebook_dir_path: Optional[str] = None, directory path to save the notebook in

levels: Optional[int] = 1, number of program stack layers to put in notebook

### Usage

import alkh

alkh.take_it_offline('path-of-notebooks-directory')

or 

alkh.take_it_offline('path-of-notebooks-directory', levels=2)

or

bash:

export ALKH_NOTEBOOKS_PATH='path-to-notebooks-directory'

python:

import alkh

alkh.take_it_offline()

or 

alkh.take_it_offline(levels=2)

### Usage flow example
Stop at breakpoint within PyCharm  
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/take-it-offline-0.png?raw=true)  
Use Console to run code within debugger  
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/take-it-offline-1.png?raw=true)  
Run: import alkh  
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/take-it-offline-2.png?raw=true)  
Run: alkh.take_it_offline('path-of-notebooks-directory')  
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/take-it-offline-3.png?raw=true)  
Start Jupyter  
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/take-it-offline-4.png?raw=true)  
Run the notebook  
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/take-it-offline-5.png?raw=true)


## Focus on code pathways using local web application

### API

function name: analyze

description: launches web application to analyze code pathways

parameters:None

### Usage

import alkh</br>
alkh.analyze()

### Usage flow example

Add two line to top of file
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/analyze-0.png?raw=true)  
Run the file
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/analyze-1.png?raw=true)  
Analyze your code
![](https://github.com/erez-aharonov/alkh/blob/main/readme_files/analyze-2.png?raw=true)



