Reliable path resolution for Python apps, even in frozen environments like PyInstaller.
Project description
📦 deepath
deepath is a lightweight Python library that helps you reliably resolve file paths in any environment — from development to PyInstaller-frozen applications.
No more "file not found" errors when your app is bundled or run from a different working directory. deepath makes path handling robust and environment-aware.
🔧 Why deepath?
When you're building:
- ✅ Command-line tools
- ✅ Desktop apps with PyInstaller, cx_Freeze, Nuitka, Briefcase...
- ✅ Python packages that need to load files (e.g. configs, models, images)
…resolving the correct path to your files becomes tricky.
deepath simplifies this — with one call that just works:
from deepath import deepath
path = deepath("assets/icon.png")
💡 Features
- 📦 Handles frozen apps (
sys._MEIPASSdetection for PyInstaller) - 🧪 Dev-friendly: detects project root via
.env,.git, orpyproject.toml - 🔁 Custom root override if needed
- 💥 Descriptive errors when a path doesn’t exist
🚀 Installation
pip install deepath
🛠️ Usage
from deepath import deepath
# Resolves path relative to the project root or frozen env
icon = deepath("assets/logo.svg")
🧪 CLI usage
You can also use it in your terminal:
python -m deepath assets/logo.svg
🧩 Supported Environments
- PyInstaller
- cx_Freeze
- Nuitka
- Dev mode
- CLI
- Python packages
📚 License
MIT License © 2025 Lounes ALLIOUI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deepath-0.1.2.tar.gz.
File metadata
- Download URL: deepath-0.1.2.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3ef8815e4bcd31d0c907fa5b311fc45c4dfbac5b23553a745cd5fae16f1bc54
|
|
| MD5 |
fd4034dfdc30d494388b18f91c37d1e8
|
|
| BLAKE2b-256 |
45167eb85269927a46f8fbae995e425c7a96275d7f5faf364da45f1c11c58f1d
|
File details
Details for the file deepath-0.1.2-py3-none-any.whl.
File metadata
- Download URL: deepath-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0611181c2dd5c8d3632668c1d32080d09f5c74b534a6df4dfdfb16e3c742d407
|
|
| MD5 |
f0b8a9dc8265ca1730198c29075f1400
|
|
| BLAKE2b-256 |
d7d679edfe64e5b0a9d364616b0b622f835091a5d97a94a5cd75900e68dd87aa
|