Skip to content

Releases: williamjameshandley/py2nb

py2nb v1.1.0: Enhanced Workshop Development Tools

30 May 14:29
a1ad5dd

Choose a tag to compare

py2nb v1.1.0: Major Enhancement Release 🚀

Now available on PyPI: pip install py2nb 📦

🆕 New Features

Command Blocks (#\!)

  • Install dependencies modularly within notebooks
  • Perfect for workshop development and Google Colab compatibility
  • Example: #\! pip install matplotlib numpy

Custom Output Filenames (--output)

  • Full control over generated notebook names
  • Works with both py2nb and nb2py
  • Example: py2nb script.py --output workshop.ipynb

Notebook Execution (--execute)

  • Execute notebooks during conversion
  • Create both clean and executed versions for workshops
  • Example: py2nb script.py --output executed --execute

Programmatic API

  • Import and use as Python modules
  • Clean integration for automated workflows
  • Example: import py2nb; py2nb.convert('script.py', execute=True)

🔧 Fixes & Improvements

GitHub Issues Resolved

  • #7: UTF-8 encoding for cross-platform compatibility
  • #8: Module importability for programmatic use
  • #9: Kernel metadata (already implemented)

Quality Enhancements

  • 16 comprehensive test cases
  • Vim integration guide with syntax highlighting
  • Enhanced documentation with examples
  • Production-ready packaging

📈 Upgrade Benefits

For Workshop Developers:

  • Script-first development → notebook conversion workflow
  • Modular dependency management with command blocks
  • Clean/executed notebook pairs for different audiences

For Automation:

  • Programmatic API for notebook generation pipelines
  • Custom output control for complex workflows
  • UTF-8 support for international content

🏃‍♂️ Quick Start

# Install latest version
pip install py2nb

# Basic conversion
py2nb script.py

# Workshop workflow  
py2nb workshop.py --output clean
py2nb workshop.py --output executed --execute

# Programmatic usage
python -c "import py2nb; py2nb.convert('script.py', execute=True)"

📚 Full Documentation

See the comprehensive README for complete usage examples, vim integration, and API reference.


Major Contributors: @williamjameshandley
Issues Fixed: #7, #8, #9
PyPI: https://pypi.org/project/py2nb/1.1.0/

1.0.0: Merge pull request #3 from dtasev/support_more_chars

30 Jan 09:30
ba0b518

Choose a tag to compare

0.0.4

05 Nov 19:27

Choose a tag to compare

Added reverse script

0.0.3

05 Nov 08:50

Choose a tag to compare

Better documentation

0.0.2

05 Nov 07:30

Choose a tag to compare

Added license

0.0.1

05 Nov 07:21

Choose a tag to compare

Reordered readme