trailpack
Trailpack proposes a standard way to link data and specialized metadata in one single file. It provides a simple interface to link metadata to fixed ontologies, improving the accessibility and comparability of datasets from different sources.
What is Trailpack?
Trailpack combines metadata and data into a single Parquet file, making open data more accessible and sustainable. It validates metadata against developed standards including:
- General metadata for the data package (name, license, contributors)
- Specialized metadata for each data column - linking both column names and units to fixed descriptions in ontologies provided by PyST
The developed standard expands on and is compatible with the Frictionless Data Package specification. The metadata is included under the datapackage.json keyword in the Parquet file.
The output file is readable using PyArrow and other data handlers - and will be compatible and consumable using Sentier data tools.
Origin: Trailpack was initially built during the hackathon of Brightcon 2025 in Grenoble, as part of developing the standard data format for Départ de Sentier.
Installation
You can install trailpack via pip from PyPI:
pip install trailpack
Usage
Web Application
The easiest way to use Trailpack is through the web application.
The web app provides a step-by-step workflow:
- Upload File & Select Language: Upload an Excel file and select language for PyST mapping
- Select Sheet: Choose which sheet to process with data preview
- Map Columns: Map each column to PyST concepts with automatic suggestions
- General Details: Provide package metadata (name, title, license, contributors)
- Download: Get your standardized Parquet file with embedded metadata
For walkthrough videos demonstrating the workflow, see the documentation.
Local Web UI
You can also run the Streamlit UI locally:
trailpack ui
For more details, see trailpack/ui/README.md.
Deploying to Streamlit Cloud? See STREAMLIT_DEPLOYMENT.md for complete deployment instructions.
📦 DataPackage Schema Classes
Trailpack includes comprehensive schema classes for building Frictionless Data Package metadata:
Key Features
DataPackageSchema: Defines field types, validation rules, and UI configurationMetaDataBuilder: Fluent interface for creating metadata programmatically- Field validation: Built-in validation for package names, versions, URLs
- UI integration ready: Field definitions include labels, placeholders, patterns
- Standards compliant: Follows Frictionless Data Package specification
Quick Example
from trailpack.packing.datapackage_schema import MetaDataBuilder, Resource
# Create metadata with fluent interface
metadata = (MetaDataBuilder()
.set_basic_info(name="my-dataset", title="My Dataset")
.add_license("CC-BY-4.0")
.add_contributor("Your Name", "author")
.add_resource(Resource(name="data", path="data.parquet"))
.build())
# Use with Packing class
from trailpack.packing import Packing
packer = Packing(df, metadata)
packer.write_parquet("output.parquet")
🔍 Validation System
Trailpack includes a comprehensive validation system to ensure data quality and standards compliance:
Features
- ✅ Metadata validation: Required fields, naming conventions, license checking
- ✅ Data quality metrics: Missing values and duplicates (logged as info, not errors)
- ✅ Type consistency: Mixed types and schema matching (raises errors)
- ✅ Unit requirements: All numeric fields must have units (including dimensionless)
- ✅ Compliance levels: STRICT, STANDARD, BASIC, or NON-COMPLIANT
Quick Example
from trailpack.validation import StandardValidator
# Create validator
validator = StandardValidator("1.0.0")
# Validate everything
result = validator.validate_all(
metadata=metadata_dict,
df=dataframe,
schema=schema_dict
)
# Check results
if result.is_valid:
print(f"{result.level}") # e.g., "✅ STRICT COMPLIANCE"
else:
print(result) # Shows all errors and warnings
Unit Requirements
All numeric fields must specify units, even for dimensionless quantities:
- Measurements: Use SI or domain units (kg, m, °C)
- IDs/Counts: Use dimensionless unit (
http://qudt.org/vocab/unit/NUM) - Percentages: Use percent or dimensionless
See trailpack/validation/README.md for complete documentation.
Contributing
Contributions are very welcome! To learn more, see the Contributor Guide.
Development Setup
Install the package with development requirements:
pip install -e ".[dev]"
Run tests:
pytest
For more information, see CONTRIBUTING.md.
License
Distributed under the terms of the MIT license, trailpack is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Building the Documentation
You can build the documentation locally by installing the documentation Conda environment:
conda env create -f docs/environment.yml
activating the environment
conda activate sphinx_trailpack
and running the build command:
sphinx-build docs _build/html --builder=html --jobs=auto --write-all; open _build/html/index.html
Metadata
Release files for trailpack 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| trailpack-0.3.0.tar.gz | 77.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trailpack-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 149.5 kB
Release files / trailpack-0.3.0.tar.gz
| Download URL | trailpack-0.3.0.tar.gz |
|---|---|
| Size | 77.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2541391c0010c9dd3ff020952b8cb8aae19fde935d04375b554ea2bf4d6cba5e
|
|
BLAKE2b-256 checksum How to use checksums |
f530842f5cf125f3f464016574214396200a465cc3e32f0d06537343096d9664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / trailpack-0.3.0-py3-none-any.whl
| Download URL | trailpack-0.3.0-py3-none-any.whl |
|---|---|
| Size | 71.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e13ca4288d0c53e4c88d8fa2ad6b11085bfa00eca11cd4774a3711838a23983b
|
|
BLAKE2b-256 checksum How to use checksums |
76fb719ceef4fb4a56cae5982e74f2e73305a7a2b00e167603409c5cc3e3baec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency log