nbdev
Create delightful software with Jupyter Notebooks
What is nbdev?
Create delightful software with Jupyter Notebooks
Overview of nbdev
What it is
nbdev is a notebook-driven development platform that allows you to write code in Jupyter Notebooks and automatically generate high-quality documentation, tests, continuous integration, and Python packages. It is designed to make debugging and refactoring easier by keeping live objects at your fingertips, and it promotes software engineering best practices by treating tests and documentation as first-class citizens.
Key features
- Documentation is automatically generated using Quarto and hosted on GitHub Pages, with support for LaTeX, search, and automatic hyperlinks (including out-of-the-box support for many packages via nbdev-index)
- Publish packages to PyPI and conda with tools to simplify releases; only exported objects are included in
__all__ - Two-way sync between notebooks and plaintext source code, allowing IDE usage for navigation or quick edits; each exported cell is tagged with its unique notebook cell ID
- Tests written as ordinary notebook cells are run in parallel with a single command
- Continuous integration out-of-the-box with GitHub Actions that run tests and rebuild docs
- Git-friendly notebooks with Jupyter/Git hooks that clean unwanted metadata and render merge conflicts in a human-readable format
Use cases
nbdev is suitable for developers who want to create Python packages while leveraging the interactive and exploratory nature of Jupyter Notebooks. It is particularly useful for projects that require integrated documentation, automated testing, and streamlined release workflows. The platform is also beneficial for teams that need to maintain clean, version-controlled notebooks and ensure code quality through continuous integration.
Getting started
shpip install nbdevNote that nbdev must be installed into the same Python environment used for both Jupyter and your project. For detailed usage instructions, see the repository README.
License and pricing
This project is licensed under the Apache-2.0 license and is open source.
這是什麼
nbdev 是一個以筆記本為驅動的開發平台,讓你在 Jupyter Notebooks 中撰寫程式碼,並自動產生高品質的文件、測試、持續整合以及 Python 套件。它透過隨時可用的即時物件,讓除錯和重構程式碼變得更容易,並將測試和文件視為一等公民,從而推廣軟體工程的最佳實踐。
主要功能
- 使用 Quarto 自動產生文件並託管於 GitHub Pages,支援 LaTeX、搜尋功能以及自動超連結(透過 nbdev-index 即可直接支援許多套件)
- 可將套件發佈至 PyPI 和 conda,並提供簡化發佈的工具;只有匯出的物件會包含在
__all__中 - 筆記本與純文字原始碼之間的雙向同步,允許使用 IDE 進行導航或快速編輯;每個匯出的儲存格都會標記其唯一的筆記本儲存格 ID
- 以一般筆記本儲存格撰寫的測試,可透過單一指令平行執行
- 內建 GitHub Actions 持續整合,可執行測試並重建文件
- 對 Git 友善的筆記本,透過 Jupyter/Git 鉤子清除不需要的中繼資料,並以人類可讀的格式呈現合併衝突
使用情境
nbdev 適合希望在利用 Jupyter Notebooks 的互動與探索特性的同時,建立 Python 套件的開發者。它特別適用於需要整合文件、自動化測試以及簡化發佈流程的專案。該平台也有利於需要維護乾淨、版本受控的筆記本,並透過持續整合確保程式碼品質的團隊。
快速開始
shpip install nbdev請注意,nbdev 必須安裝在與 Jupyter 和你的專案相同的 Python 環境中。詳細使用說明請參閱儲存庫的 README。
授權與價格
此專案採用 Apache-2.0 授權,為開源軟體。
Based on the project's public README and repository metadata.