Skip to main content

No project description provided

Project description

logo

PyPI - Version PyPI - Python Version


A small package (only) to export functions and classes from notebooks to scripts

Table of Contents

Installation

pip install nbdefs2py

Usage

nbdefs2py can be used as a CLI tool or a Python function.

$ python -m nbdefs2py -h
usage: python -m nbfuncs [-h] [-i IGNORE] [--update] [--no-update] [--include INCLUDE [INCLUDE ...]]
                         [--exclude EXCLUDE [EXCLUDE ...]]
                         SRC DST

Extract definitions from notebooks.

positional arguments:
  SRC                   source file/path
  DST                   target file/path

optional arguments:
  -h, --help            show this help message and exit
  -i IGNORE, --ignore IGNORE
                        glob expression of files to ignore
  --update              update only existing functions
  --no-update           overwrite destination file
  --include INCLUDE [INCLUDE ...]
                        names of functions to include
  --exclude EXCLUDE [EXCLUDE ...]
                        names of functions to ignore
>>> from nbdefs2py.io import export
>>> export(source="nb.ipynb", destination="exported.py")

License

nbdefs2py is distributed under the terms of the MIT license.

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

nbdefs2py-0.1.3.tar.gz (50.5 kB view hashes)

Uploaded Source

Built Distribution

nbdefs2py-0.1.3-py3-none-any.whl (7.5 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