Google Colab workflow utilities
Project description
colab-assist
Utilities that assist development workflows on Google Colab
Documentation · Issues · PyPI
About
-
colab-assist is a small package that shares utility functions I find useful for my development workflows on Google Colab.
-
Actually, this is also a semi-mock project that I use to learn Python open-source development. Feedbacks, guidance, and feature suggestions are much appreciated!
Usage
Experimenting your private Python package on Colab
-
Develop your package any way you like and push it to your private GitHub repo.
-
Make a repo-specific personal access token (PAT).
-
Store the PAT as a Colab Secret:
-
On Colab:
import colab_assist as A
-
Install → experiment → push → resintall:
# Install your private package A.install_gh("me/my_pkg", "dev", secret="my_token") # Experiment from my_pkg import foo foo() # (Push update accordingly to the development branch of your repo) # Reinstall updated package A.install_gh("me/my_pkg", "dev", secret="my_token") # Reimport updated functions/classes without needing to restart Colab session foo = A.reload(foo) foo()
-
Or clone → experiment → push → pull:
# Clone your private package and add it to `sys.path` A.clone_gh("me/my_pkg", "dev", opt="p", secret="my_token") # Experiment from my_pkg import foo foo() # (Push updates accordingly to the development branch of your repo) # Pull the update A.pull_gh("my_pkg") # Reimport updated functions/classes without needing to restart Colab session foo = A.reload(foo) foo()
-
Dependencies & Installation
-
Although currently colab-assist lists no dependency, it is intended to only be installed and used in a Google Colab environment. The reason not to explicitly list dependencies for now is that at least one depedency (
google-colab) is bespoke for Colab and not hosted on PyPI. However, colab-assist is designed to install and run just fine on a fresh Colab instance. -
You can install colab-assist very quickly with the pre-installed uv on Colab:
!uv pip install --system -qU colab-assist
Or with pip:
%pip install -qU colab-assist
-
This package is currently a single-file package. Therefore you may use it quick and dirty by just downloading the module file:
!wget -q https://raw.githubusercontent.com/dd-n-kk/colab-assist/master/src/colab_assist/colab_assist.py
License
Acknowledgements
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colab_assist-0.1.2.tar.gz.
File metadata
- Download URL: colab_assist-0.1.2.tar.gz
- Upload date:
- Size: 67.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc1912ffd9504ebf68b3a1417d63ce81e1581aff35b24107d5ec2ce7fc2ced47
|
|
| MD5 |
7890f2d18e35ea25bbee48d5425cacbc
|
|
| BLAKE2b-256 |
b4938f0d8a85580669bdba1cc4fcd10bb73268ee771fd5d79612e3d10a0722b2
|
File details
Details for the file colab_assist-0.1.2-py3-none-any.whl.
File metadata
- Download URL: colab_assist-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66b8095a569e65ddccd23ea0eda6f0cdbc65ad5d052d3c389ec80d5ae61b8a88
|
|
| MD5 |
f12e0ebee0c028f6d1b2137e6d8590a1
|
|
| BLAKE2b-256 |
b7796bf2c6163e28831a6eac1c413d66609e60c160b2467944435cba453e317d
|