Skip to main content

Locate a project root by anchor directory name and optionally patch sys.path.

Project description

waypin

A tiny utility to locate a project root by an anchor directory name (default: scripts) and optionally patch sys.path so absolute imports like from scripts... work in script/main execution and notebooks.

Install

pip install waypin

Usage

from waypin import reel

ROOT_DIR, is_notebook = reel("scripts")
print(ROOT_DIR, is_notebook)

Behavior

  • Searches upward from the executing context (caller __file__, or notebook path if available) to find a directory named anchor_dirname.
  • Returns the parent of that directory as ROOT_DIR.
  • Optionally appends ROOT_DIR to sys.path.

License

MIT

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

waypin-0.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

waypin-0.1.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: waypin-0.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for waypin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 685d7f68aaf41e7611aef64a3a50f10ed1ad41c3c348cd21496b53789ec5e4fe
MD5 2887b81822494cb28b1597cea6a203cf
BLAKE2b-256 986aca8fdf90b9c19196b7fecf573b7120580d511d62019d2a625c0ad4f52ee5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: waypin-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for waypin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac1dbc10fddc7fc961eb3e6c01b8af50f5bd1404671dcf22928a0fc5af913087
MD5 b4fcecd71875abbd3e6b3029dbe5b6db
BLAKE2b-256 a548303f8f6212efcdff82a8c4fc09ca44741bff827e162c3b611d384b6223aa

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