Github to Colab Link Generator
Sometimes you may want to load a Jupyter notebook from your repo to colab and run it there. Other times you may just want to add a colab link to your repositories readme page. Sure you can download a notebook and then import to colab but that may not always be ideal. The goal of this cli tool is to short-circuit that process so that you don't have to go through the extra clicks.
Pre-requisites
- The repo where your notebook is must be public
Installation and Usage
Install from pip
pip install -U github-to-colab-link
Usage
The package currently generates links in two formats, one is a plain string, which you can copy and load in an web browser; another is a markdown embed which you can use in your markdown style docs, e.g. Github readmes.
# for plain string
colab-link-gen --string --gh link_to_notebook
# example
colab-link-gen --string --gh https://github.com/ShawonAshraf/jax_examples/blob/main/playground/palmers_penguins.ipynb
# for markdown embed
colab-link-gen --md --gh link_to_notebook
# example
colab-link-gen --md --gh https://github.com/ShawonAshraf/jax_examples/blob/main/playground/palmers_penguins.ipynb
Dev
- Clone the repo
- Create a
virtualenv - Install the requirements
pip install -r requirements.txt
- The entrypoint for the cli tool is in
cli.py(therun()function) link.pycontains the helpers to generate the links
Testing
python -m unittest discover -s ./tests -p "*_test.py"
Metadata
Release files for github-to-colab-link 1.0.1
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 | Actions |
|---|---|---|---|---|
| github-to-colab-link-1.0.1.tar.gz | 3.8 kB | Without provenance | Details for github-to-colab-link-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| github_to_colab_link-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for github_to_colab_link-1.0.1-py3-none-any.whl |
Total release size: 8.3 kB
Release files / github-to-colab-link-1.0.1.tar.gz
| Download URL | github-to-colab-link-1.0.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04c8f394cc32ef3720f4e4228e67da2f86ff15197ab900db4cc8dba66b51d8ca
|
|
BLAKE2b-256 checksum How to use checksums |
b31205012a435b3875db67b03cdf239380f16fa8f2a93596a8e6ea31457ffed1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.0
|
Release files / github_to_colab_link-1.0.1-py3-none-any.whl
| Download URL | github_to_colab_link-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
439065cde38a172e99a43e1bb5d760588c326416954587883b8a14cda4dfb939
|
|
BLAKE2b-256 checksum How to use checksums |
f859ad64417d8495e5b91302fcb6f4fc8df8bf6b170642661221eaf19cb74d38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.0
|
Security for github-to-colab-link 1.0.1
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.