Talks - Koushik Krishnan: Rest Easy with Jupyrest: Deploy notebooks as web services

Learn how to transform Jupyter notebooks into REST APIs with Jupyrest, an open-source library from Microsoft that enables automated reporting & runbook execution.

Key takeaways
  • Jupyrest is a library that converts Jupyter notebooks into REST APIs, developed at Microsoft and now open source

  • Key components of a notebook function:

    • Input schema (parameters)
    • Output schema
    • Unique identifier
    • Configuration file matching notebook name
  • Main use cases:

    • Incident response automation
    • Runbook automation
    • Converting script directories into maintainable services
    • Automated reporting
    • Custom dashboards
  • Benefits:

    • Preserves notebook’s visual elements (charts, graphs, tables)
    • Provides execution logs and debugging information
    • No need to rewrite notebooks for production
    • Works with standard JSON schemas
    • Supports Python objects as input/output
  • Deployment options:

    • Fast API for local development
    • Azure Functions for serverless deployment
    • Compatible with most serverless platforms
  • Limitations:

    • Not suitable for high-performance/low-latency services
    • Cannot support interactive features requiring running kernel
    • Notebooks may take longer to execute
    • Not ideal for real-time applications
  • Implementation details:

    • Injects code cells with input parameters
    • Converts JSON input into Python code
    • Generates HTML execution reports
    • Provides error handling and validation
    • Supports multiple notebook routing
  • Production ready:

    • In use at Microsoft since 2020
    • MIT licensed
    • Supports multiple deployment environments
    • Handles monitoring and telemetry automatically