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.
|
└── 📁 paks_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.1.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.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: devpath-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 96c9870704ae7268859508de53a89ad374117841eea11eb8f3f26572540dedfb
MD5 1976019c1b2b5a11f3fe755491aa6b19
BLAKE2b-256 b7a0637524838a7e466e04847553666ac61b169c072c4675ef813d06c4e05050

See more details on using hashes here.

File details

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

File metadata

  • Download URL: devpath-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 528c0de94dbd99498acb49f212f6aaca8a2fa8f1ff281b7ae21aa8552f8fb9e8
MD5 c3c1d5a469a5b233f6cd04bffa271f63
BLAKE2b-256 79443d7c21f4cd6f6a3c3da021643a89eee4e1e2a380f4a23d1e0576d14c5506

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