Skip to main content

lib2nbdev

An all-inclusive package for converting your existing libraries and projects into nbdev ones. Developed by Novetta.

nbdev is a fantastic workflow aimed at centralizing documentation, testing, and source code generation all out of one place: Jupyter Notebooks. However, what if you already have an existing project? As it stands the only way to convert your library over is through manual tasks (which can take > 30 hrs!).

lib2nbdev is the solution!

Instead, we can perform a one-time conversion on any existing library. During the conversion process the library will help you generate a proper settings.ini configuration file for your project. However you can also generate your own settings.ini and put it in your project's core directory, such as:

  • lib2nbdev
    • settings.ini
    • lib2nbdev
      • convert.py

For generating a valid settings.ini, see an example here and the related nbdev documentation

Install

pip install lib2nbdev

How to use

From your project directory (in bash), simply run:

convert_lib

And it will automatically generate the notebooks needed, as well as privatizing any functions that may need it (anything preceding with a _ in the name) where they shouldn't show in the generated documentation.

Afterwards you have a fully-functional nbdev library, and can make use of all its goodies!

Note for Windows Users:

If you wish to use this library you should either:

  1. Use Windows Subsystem for Linux (WSL2)
  2. Use the Python3 interpreter in Windows:
    • python3
    • from lib2nbdev.convert import convert_lib; convert_lib()

Important Notice:

This is a one-time conversion, this does not allow for repeated python -> notebook conversions.

Metadata

Release files for lib2nbdev 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lib2nbdev 1.0.0
File Size Uploaded Provenance Actions
lib2nbdev-1.0.0.tar.gz 14.3 kB Without provenance Details for lib2nbdev-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lib2nbdev 1.0.0
File Interpreter ABI Platform Actions
lib2nbdev-1.0.0-py3-none-any.whl Python 3 none any Details for lib2nbdev-1.0.0-py3-none-any.whl

Total release size: 27.6 kB

Release files / lib2nbdev-1.0.0.tar.gz

Download URL lib2nbdev-1.0.0.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7def00e75683eba386288fe3d34ca94c975b52561af9446d20bbb3b8d84159e3
BLAKE2b-256 checksum
How to use checksums
3ad917a80748699bbe067ab30c18b0b93d182e04528c6a809fa372fc9cf38297
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / lib2nbdev-1.0.0-py3-none-any.whl

Download URL lib2nbdev-1.0.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd45b5a85ab0e7c173135a24d580f18c1d95ad0baf73f1a395f0822eca4a8185
BLAKE2b-256 checksum
How to use checksums
e13896bcaa3df9958f5e1f551b704c892191e02166baf58e62babe00d16be37e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for lib2nbdev 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page