Skip to main content

A zero-config Python development hook for instantaneous package importing during development.

Project description

🎣 devpath: The Zero-Config Python Development Hook

devpath is a minimal, ultra-efficient utility designed to eliminate development friction when testing Python packages. It provides an instant, self-configuring "editable install" experience without requiring external command-line tools like pip install -e . or complex environments.

✨ Philosophy: Install-and-Go Debugging

The primary goal of devpath is to ensure that code changes made in your source files are immediately available upon import. This is achieved by leveraging a core Python mechanism to prioritize your development directory over the installed package.

Forget the console commands—just import and develop.

⚙️ How It Works: The sys.path Injection (Direct Import)

The core of devpath is a single, concise function executed upon module import.

  1. Automatic Detection: When you run import devpath, the logic automatically searches upwards from the execution directory for the local development folder (named paks_repo).
  2. Path Hook: It injects the path to your source folder into the beginning of the Python's global sys.path list.
  3. Priority: Because the source folder is now a top-level location, all subsequent imports (e.g., import pak1) will find and load the source code version (the one you are currently editing) instead of the installed package version.

Benefits

  • Zero Configuration: No pip install -e . necessary in your workflow.
  • Instant Updates: Code changes are reflected immediately on re-execution.
  • Minimal Footprint: The entire library is one file (__init__.py).

🚀 Usage

1. Installation

Install the hook once in your development environment:

pip install devpath


📦 Proyect_folder/ (The project root)
├── 📝 my_test_script.py  <-- Your test script that runs the code.
|
└── 📁 packs_repo/         <-- Your SOURCE CODE that you edit.
    ├── 📦 pak1/           <-- Your package (e.g., your library code).
       ├── __init__.py
       └── code.py
        └── 📦 pak2/
        └── ... (Other packages in development)

``` bash
import devpath             <-- The hook is now activated.
import pak1   <-- Loads 'pak1' from your source folder (libtest/pak1/)

pak1.run_my_new_feature()
# ... Modify pak1/code.py and run the script again—the new code is instantly loaded.

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

devpath-0.1.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

devpath-0.1.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file devpath-0.1.2.tar.gz.

File metadata

  • Download URL: devpath-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for devpath-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fe06fab4bf5a8db9f8f7f6e2518b5acb46bd0e59ff450e6b20f4c01e76bec506
MD5 acd1796e126aec0a2afb9e399d735c50
BLAKE2b-256 338c51b734cbb34801441153ce1b0f221590aebbabd1e6a9ac45be62e477e374

See more details on using hashes here.

File details

Details for the file devpath-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: devpath-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for devpath-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4278dde94c1b296fd3f9262377ea8845e9798a223423e5ad93b6cd7d0d00b70
MD5 12781c8e77bef9ed0b0bfac96144d980
BLAKE2b-256 b5d46049b0484f64f4011cfb33f4e5841294dbe31b46a606aba9f351a94cc295

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