ColabKit
ColabKit is a lightweight bridge between Python and JavaScript for Google Colab.
It allows you to load custom JavaScript tools, interact with the browser, control the webcam, capture frames, and build interactive Colab applications with minimal effort.
This package bundles two client-side JavaScript modules:
media.js– Camera control, frame capture, device switchingconsole.js– A styled typewriter-style console component
and provides a Python interface (ColabKit) that communicates with them through google.colab.output.
Features
- Load and run custom JavaScript utilities inside Google Colab
- Control the webcam (start/stop/change camera)
- Capture image frames directly into Python as Base64
- Monitor device changes (camera plugged/unplugged)
- Display a browser-side animated console
- Simple, clean and extensible API
Installation
pip install git+https://github.com/MuhammetOzturk/colabkit.git
Quick Start
1. Import the module
from colabkit import ColabKit
kit = ColabKit()
2. Load the JavaScript tools into the notebook
kit.loadTools(["media.js", "console.js"])
3. Start the camera
kit.startCamera()
4. Capture a frame
frame = kit.captureFrame()
5. List cameras
kit.listCameras()
6. Switch camera
kit.changeCamera("device-id-here")
7. Stop the camera
kit.stopCamera()
File Structure (for reference)
colabkit/
│
├── colabkit/
│ ├── __init__.py
│ ├── colabkit.py
│ └── static/
│ ├── console.js
│ ├── media.js
├── README.md
├── LICENSE
├── pyproject.toml
└── setup.cfg
Why ColabKit?
Google Colab allows JavaScript execution but provides no standard pattern for organizing JS tools or interacting with them from Python. ColabKit solves this problem by bundling JS modules and exposing clean, Python-friendly methods such as:
startCamera()captureFrame()watchDeviceChanges()loadTools()
This makes it ideal for:
- AI/computer-vision experiments
- Real-time camera processing
- Interactive notebooks
- Educational tools
- Browser-based demos
Requirements
- Python 3.8+
- Google Colab environment
google-colabPython package- IPython
License
MIT License
Author
Developed by Muhammet Ozturk
GitHub: https://github.com/muhammetozturk
Email: muhammetozturk.219@gmail.com
Metadata
Release files for google-colabkit 0.0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| google_colabkit-0.0.0.2.tar.gz | 5.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| google_colabkit-0.0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / google_colabkit-0.0.0.2.tar.gz
| Download URL | google_colabkit-0.0.0.2.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f314359cbd4ac015a06c5def58b03e2d43e46ed8129bc5dc59c6c312bcd8e642
|
|
BLAKE2b-256 checksum How to use checksums |
80f6bfbb3074ee6e08bf1d5e0bd89dfb6a04600079415198af1a83051c271cf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / google_colabkit-0.0.0.2-py3-none-any.whl
| Download URL | google_colabkit-0.0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a9b6a6d1d08c5492db72e6281996a15179328452574c3b731fd7eb3ab578b04
|
|
BLAKE2b-256 checksum How to use checksums |
ec0022942e395353986b974c1ea52b2a522e616746c9808df5d77f6b41a7e19b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for google-colabkit 0.0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.