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.0.tar.gz (2.7 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.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: devpath-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 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.0.tar.gz
Algorithm Hash digest
SHA256 82906b7443c342c1608514e3648ea4aa76bf85fb29fd5764254fe64f40b51c8b
MD5 d2de3bbbb40f6b10a35af877b12fcf03
BLAKE2b-256 6cd213d7e9a3ab604dcc00418dd9d69f264d32ef941b78ecc468c9380b66ae3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: devpath-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 718b3b4f225c2426e5c2354c23045ef62b256585938b1e56d22f5cac6ff8f2af
MD5 737e02b5fae6274416c11c3acb463f8d
BLAKE2b-256 31cd821ec22cf2d95c82760f3b27c2fa43698ac667bcd1f446c92644896f807e

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