Skip to main content

Python package to check structure of python code building upon AST.

Project description

nbHint

Installation

nbHint can be installed via pip

pip install nbhint

Example

#import pacakge
from nbHint import nbHint

#parse Jupyter Notebook
nb_path = "PATH/TO/YOUR/NB.ipynb"
nb_cells = nbhint.Parser(nbPath = nb_path)

#exract cell of interest using the unique cell id
curr_cell = nb_cells.get_cell_by_id('cell-4119246836a38e04')

#conduct different checks 
curr_cell.check_for()
curr_cell.check_if(only_if=True)

For other use cases have a look at the examples\examples.ipynb. Note: If you change the content of a cell, the notebook hast to be saved before conducting a check.

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

nbhint-0.1.2.tar.gz (10.8 kB view hashes)

Uploaded Source

Built Distribution

nbhint-0.1.2-py3-none-any.whl (11.9 kB view hashes)

Uploaded Python 3

Supported by

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