Welcome to ColabHost’s documentation!

ColabHost

https://img.shields.io/pypi/v/colab_host.svg Documentation Status https://img.shields.io/badge/code%20style-black-000000.svg

Host any python application in colab or kaggle notebook environment. Inspired from Abhishek Thakur, and his work on colab code to host VScode IDE in any notebook environment using pyngrok.

Features

Since colabcode already hosts VScode IDE this package extends the idea to host following IDE and python applications:

  • Jupyter Notebook
  • Jupyter Lab
  • Flask and Gunicron applications
  • FastAPI and Uvicorn applications

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Usage

To start a simple HTTP File Server:

from colab_host import SimpleHttpServer

SimpleHttpServer(port=1000)

To start Jupyter Notebook in colab:

from colab_host import JupyterNotebook

JupyterNotebook(port=1000)

To start Jupyter Lab in colab:

from colab_host import JupyterLab

JupyterLab(port=1000)

To start Flas Application in colab:

from colab_host import FlaskApp

FlaskApp(
    port=1000,
    app="main:app",
    git_url="https://github.com/PuneethaPai/colab_host_flask_demo.git",
    requirements_file="requirements.txt"
)

To start Uvicorn App in colab:

from colab_host import UvicornApp

UvicornApp(
    port=1000,
    app="main:app",
    git_url="https://github.com/PuneethaPai/colab_host_uvicorn_demo.git",
    requirements_file="requirements.txt"
)

Indices and tables