All docs
PackageManager·
method
PackageManager.reload_path
hot-reload the directory package at a given path in place
Python
reload_path(package_dir: Any, bus: Any = None) -> ReloadResult
Returns ReloadResult — the added / removed / kept class names
Parameters#
| name | type | default | description |
|---|---|---|---|
package_dir |
str | Path |
— | the package directory to reload (must hold an lsd_package.json) |
bus |
EventBus |
None |
optional desktop event bus for re-wiring contributions |
Example#
Python
from lsdtools.advanced import PackageManager
pm = PackageManager()
result = pm.reload_path("~/dev/my-pkg")
Notes#
Same effect as reload but addressed by path rather than name —
use it for a folder you registered with add_local whose
location you already have. It purges the package's classes/contributions, re-imports the directory,
and returns a ReloadResult diff. A missing lsd_package.json, or a sealed package, yields an empty
result.
See also#
API: reload · load_project_scripts · add_local
Guides: Develop a package
By LSD Team · Last updated Jul 17, 2026
Ask on Discord
View as Markdown