Lightweight bidirectional filesystem path templates for Python.
Project description
pathbase
pathbase is a lightweight, dependency-free Python library for bidirectional
filesystem path templates.
Status
This repository is currently a minimal v0 scaffold.
Planned Direction
The core idea is a single template that can both format and parse paths:
from pathbase import Template
template = Template(
"/shows/{show}/shots/{sequence}/{shot}/"
"{shot}_{task}_v{version:03d}.{frame:04d}.exr"
)
path = template.apply_fields(
show="bigbuckbunny",
sequence="bbb",
shot="0150",
task="plate",
version=1,
frame=1001,
)
fields = template.parse(path)
Pathbase is intended to remain focused on path formatting and parsing rather than environment loading, filesystem mutation, or pipeline orchestration.
Installation
pip install -U pathbase
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 pathbase-0.0.1.tar.gz.
File metadata
- Download URL: pathbase-0.0.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93825b074af4b41b196699cf121bce8428b6959f57e9e32f1faa61cf8f4f70d5
|
|
| MD5 |
6c8cc4a7d132272cbf8ff9791c493a7e
|
|
| BLAKE2b-256 |
dadbc93eb7829b35fbd2aaad1b6beb4c306f88afa4e8a3fd07c1072d400e946e
|
File details
Details for the file pathbase-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pathbase-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96ea1d4f251b3e4497c7c0935e528cc3cc5ebe149c0283cc1d1198d852ac7624
|
|
| MD5 |
c85ef7efbf3b3cdc30d1068a669651bf
|
|
| BLAKE2b-256 |
2e39ab2c12f74cd3aac067186268c7a0a395b13deb498a720b9cc5a5c9d45585
|