Skip to main content

Harmonises Jupyter and Colab notebook environments for consistent paths, imports, and working directories

Project description

colocal

Colab or local — same behaviour, same results.

colocal is a lightweight utility that harmonises notebook environments across Google Colab and local Jupyter.

It takes care of paths, imports, and working directories automatically, so your notebooks behave consistently no matter where you run them.


✨ Features

  • Seamless dual support → Detects whether you’re in Colab or Jupyter and adjusts automatically.
  • Clean imports → Adds your repository root to sys.path.
  • Consistent working directory → Sets cwd to the notebook’s folder, avoiding ../../ hacks.
  • Branch-aware in Colab → Parses the Colab badge, checks out the correct branch, and mirrors the repo structure.
  • Reproducibility → Run the same notebook in Colab or locally with identical behaviour.

🚀 Usage

import colocal
colocal.setup()

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

colocal-2025.9.17.512.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colocal-2025.9.17.512-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file colocal-2025.9.17.512.tar.gz.

File metadata

  • Download URL: colocal-2025.9.17.512.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for colocal-2025.9.17.512.tar.gz
Algorithm Hash digest
SHA256 e51b45423a026a61aa7d00a7ccbc58ecc1b38f6301c6b6d09eedaa03a147f672
MD5 7b4d746a6eda6a0ac430703d36b2e6a8
BLAKE2b-256 054202302b2ae2d0fd04e1e178ab8b44b4030fa6cb8e2f2721849b8f2df297b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for colocal-2025.9.17.512.tar.gz:

Publisher: publish.yml on project-ida/colocal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colocal-2025.9.17.512-py3-none-any.whl.

File metadata

File hashes

Hashes for colocal-2025.9.17.512-py3-none-any.whl
Algorithm Hash digest
SHA256 7706ba269feb665434c7623f3beddf43ff9031a1ca024ed4f5f4a33ce3931bc5
MD5 038a9c555901f894ca5f09d4a26078f0
BLAKE2b-256 d8e82a25a5f8a3741f2e1749f96cb5eec2bde70ddeab1479a8c0915a4b572121

See more details on using hashes here.

Provenance

The following attestation bundles were made for colocal-2025.9.17.512-py3-none-any.whl:

Publisher: publish.yml on project-ida/colocal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page