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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file nbhint-0.1.2.tar.gz.

File metadata

  • Download URL: nbhint-0.1.2.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for nbhint-0.1.2.tar.gz
Algorithm Hash digest
SHA256 78f2d39626e66035cf40c8ec891ee2e3c1137e383082e318c18e6bead205d9d1
MD5 c5f5877c94931155672203a39ba3d89c
BLAKE2b-256 50cbac004de64c66588c5ea503720acb28c0d7cf3aa63e3c092785476ee264ec

See more details on using hashes here.

Provenance

File details

Details for the file nbhint-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nbhint-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for nbhint-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fba88665a37ab5db5fcdfe8b62820206fa997ecad74e04c610d2f47d4fc74d04
MD5 ad13ec49939d78e5061971d868e68042
BLAKE2b-256 7531ee58dfdef12035185ec5d53df5e2692cdf6f24c938762e478a2422fa5218

See more details on using hashes here.

Provenance

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