Skip to main content

Easily toggle between development and production packages with uv. Quickly close development packages locally.

Project description

Python Development Source Toggler

A utility script for easily switching between local development and published sources for Python packages in your pyproject.toml.

Features

  • Automatically toggles between local development paths and GitHub sources
  • Preserves TOML file comments and structure
  • Automatically clones repositories when switching to local development
  • Supports branch tracking
  • Falls back to PyPI metadata if direct GitHub repository is not found
  • Integrates with GitHub CLI for username detection

Installation

pip install -r requirements.txt

Usage

To toggle a module named "activemodel":

pip install uv-development-toggle
uv-development-toggle activemodel --published

This will:

  1. Check if the package exists in your PYTHON_DEVELOPMENT_TOGGLE directory
  2. If switching to local and the repository doesn't exist, clone it automatically (attempts to determine the repo URL from pypi information)
  3. Update your pyproject.toml with the appropriate source configuration
  4. Preserve any existing branch information when toggling

Arguments

  • MODULE_NAME: The name of the Python module to toggle
  • --local: Force using local development path
  • --published: Force using published source

Environment Variables

  • PYTHON_DEVELOPMENT_TOGGLE: Directory for local development repositories (default: "pypi")

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

uv_development_toggle-0.2.1.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

uv_development_toggle-0.2.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file uv_development_toggle-0.2.1.tar.gz.

File metadata

File hashes

Hashes for uv_development_toggle-0.2.1.tar.gz
Algorithm Hash digest
SHA256 88cbcf2eb6307350235fa65ab62d73091b03d1db7ed3a3f119260c6e3b5e3717
MD5 d69e2940265a64c2c28c5a134b12d4a4
BLAKE2b-256 1a96628be6578a9d2fb5cad7dc219fb2fd4b0ec22130293d5f5d51e228c8dccf

See more details on using hashes here.

File details

Details for the file uv_development_toggle-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for uv_development_toggle-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3ac922b024ef88956003cade09dd2e7f9a71c226e090afe65be8515087a3011
MD5 84dd4466352b84dfc8a7b072bcfde8b9
BLAKE2b-256 22d7427977d0402ae54b7fd338a91201513af0dcbc317061a51b23084c3ca0cd

See more details on using hashes here.

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