Metadata-Version: 2.4
Name: notebook-to-code
Version: 3.0.3
Summary: Advanced Jupyter Notebook to Python script converter with round-trip support
Author: Notebook Converter Team
License: MIT
Project-URL: Bug Reports, https://github.com/your-org/notebook-to-code/issues
Project-URL: Source, https://github.com/your-org/notebook-to-code
Project-URL: Documentation, https://notebook-to-code.readthedocs.io/
Keywords: jupyter,notebook,converter,ipynb,python
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: nbformat>=5.7.0
Requires-Dist: click>=8.0.0
Requires-Dist: typing-extensions>=4.4.0
Requires-Dist: pluggy>=1.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0.0
Requires-Dist: tqdm>=4.64.0
Requires-Dist: aiofiles>=22.1.0
Requires-Dist: python-dateutil>=2.8.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: isort>=5.10.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: pre-commit>=2.20.0; extra == "dev"
Provides-Extra: gui
Requires-Dist: streamlit>=1.25.0; extra == "gui"
Requires-Dist: flask>=2.3.0; extra == "gui"
Requires-Dist: flask-cors>=4.0.0; extra == "gui"
Provides-Extra: analysis
Requires-Dist: pylint>=2.15.0; extra == "analysis"
Requires-Dist: flake8>=5.0.0; extra == "analysis"
Requires-Dist: bandit>=1.7.0; extra == "analysis"
Dynamic: requires-python

# notebook-to-code

 Jupyter Notebook ➜ Python converter with round‑trip metadata, semantic Markdown processing, a pluginable theme system, batch mode, and a friendly CLI.

Key features
- Convert `.ipynb` ➜ `.py` with clear, annotated cells
- Optional reverse conversion (annotated `.py` ➜ `.ipynb`)
- Semantic Markdown processing and wrapping
- Round‑trip metadata to validate integrity
- Batch processing for folders/patterns
- Theme plugins (e.g., default, minimal)
- Rich CLI output (optional)

Install
- Stable release:
  - `pip install notebook-to-code`
- Extras:
  - GUI: `pip install notebook-to-code[gui]`
  - Analysis: `pip install notebook-to-code[analysis]`
  - Dev: `pip install notebook-to-code[dev]`

Quickstart
- Convert a single notebook:
  - CLI: `notebook-to-code convert path/to/notebook.ipynb -o out.py --stats`
  - Python one‑liner:
    - `from notebook_converter import convert_notebook; convert_notebook("path/to/notebook.ipynb", "out.py")`
- Batch convert a folder:
  - `notebook-to-code batch notebooks/ -o converted/ --pattern *.ipynb`
- Reverse (annotated .py ➜ .ipynb):
  - `notebook-to-code reverse script.py -o out.ipynb`
- List themes:
  - `notebook-to-code themes`

CLI Options (highlights)
- `--theme default|minimal` choose a theme
- `--no-metadata` disable metadata preservation
- `--no-round-trip` disable round‑trip metadata
- `--no-semantic-markdown` disable semantic Markdown
- `--quality-analysis` enable code quality checks
- `--max-line-length 88` wrap text/comments at length
- `--stats` show conversion statistics

Python API (minimal)
```python
from notebook_converter import AdvancedNotebookConverter, ConversionOptions

options = ConversionOptions(semantic_markdown=True, round_trip_metadata=True)
converter = AdvancedNotebookConverter(options=options)

out_file, stats = converter.convert_notebook("path/to/notebook.ipynb", "out.py")
print("Converted:", out_file)
```

Project structure
- Package: `notebook_converter` (import path)
- CLI: `notebook-to-code` (entry point)
- Source: `notebook_converter/src/notebook_converter/`

Contributing
- Create a virtual env and install in editable mode:
  - `pip install -e .[dev]`
- Run tests (if configured):
  - `pytest -q`

License
- MIT

How PyPI description works
- The "Project description" on PyPI is rendered from this `README.md`.
- Configuration is set in `pyproject.toml` via `readme = "README.md"` and `description`.
- To update what appears on PyPI:
  1) Edit this README.
  2) Bump the version in `pyproject.toml` and in `notebook_converter/src/notebook_converter/__init__.py`.
  3) Rebuild and upload a new release:
     - `py -m build && py -m twine upload dist/*`
- PyPI does not allow editing a release’s metadata in place; publish a new version to change the description.
