Template-based path generation for data pipelines
Project description
SciPathGen
Template-based path generation for data pipelines.
Generates file paths with associated metadata from a template and metadata value combinations.
Usage
from scipathgen import PathGenerator
paths = PathGenerator(
"{subject}/trial_{trial}.mat",
root_folder="/data/experiment",
subject=range(3),
trial=range(5),
)
for path, meta in paths:
print(path, meta)
# /data/experiment/0/trial_0.mat {'subject': 0, 'trial': 0}
# /data/experiment/0/trial_1.mat {'subject': 0, 'trial': 1}
# ...
# Supports indexing and length
print(len(paths)) # 15
path, meta = paths[0]
If root_folder is omitted, paths are resolved relative to the current working directory via Path.resolve().
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
scipathgen-0.1.0.tar.gz
(2.9 kB
view details)
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 scipathgen-0.1.0.tar.gz.
File metadata
- Download URL: scipathgen-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47c4e29e19b5653d1730c0a0648e8e2126101647fe4731ddd11270b481fe7cf1
|
|
| MD5 |
ac12f8047593566f6e8feb51ba12e969
|
|
| BLAKE2b-256 |
bd864cabc2048666cd71270e6017d5521d19f1b2d342215de6a05339bbbbadd3
|
File details
Details for the file scipathgen-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scipathgen-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1ae5e1037581d9823a1d516b1324a4aac4ae3465904b823e7d3aab0602cc130
|
|
| MD5 |
b672371fab1fdf6337319bf015355e35
|
|
| BLAKE2b-256 |
85666c08faa712826e0fb0670eb8b8f3ea24357c9c4e234bccdeb93ac372a0c1
|