pivmetalib
A Python library and high-level interface to work with the pivmeta ontology. It allows you to describe PIV recordings, software, hardware and other related entities in a state-of-the-art and scientifically compliant way.
The library depends on ontolutils, which provides the object-oriented interface to the ontology and the JSON-LD serialization.
🚀 Quick Start
Install the package and create your first PIV metadata in minutes:
pip install pivmetalib
from pivmetalib import pivmeta, prov
# Describe PIV software
software = pivmeta.PIVSoftware(
author=prov.Organization(
name='OpenPIV',
url='https://github.com/OpenPIV/openpiv-python',
),
description='OpenPIV is an open source Particle Image Velocimetry analysis software',
softwareVersion="0.26.0a0",
hasDocumentation='https://openpiv.readthedocs.io/en/latest/',
)
# Export to JSON-LD for FAIR data sharing
print(software.serialize("jsonld"))
**📚 Want to learn more? ** → Complete User Guide | Examples | API Reference
📖 Table of Contents
- What You Can Do with pivmetalib
- Installation
- User Journey Guide
- Key Features
- Documentation
- Examples
- Contribution
- Troubleshooting
🎯 What You Can Do with pivmetalib
For Researchers
- Document PIV Experiments: Create comprehensive metadata for your recordings, setups, and processing steps
- FAIR Data Compliance: Export standardized metadata that makes your data findable, accessible, interoperable, and reusable
- Reproducible Research: Capture complete experimental configurations for scientific reproducibility
- Data Processing Pipelines: Document complex PIV processing workflows with provenance
- Tool Interoperability: Enable metadata exchange between different PIV tools
- Long-term Preservation: Store metadata in standards-compliant formats (JSON-LD, TTL)
💻 Installation
Basic Installation
The package is available on PyPI and can be installed via pip:
pip install pivmetalib
Development Installation
For development or to access additional dependencies:
# Install with test dependencies
pip install pivmetalib[test]
# Install with all optional dependencies
pip install pivmetalib[complete]
# Install from source for development
git clone https://github.com/matthiasprobst/pivmetalib.git
cd pivmetalib
pip install -e .[test]
Verify Installation
import pivmetalib
print(f"pivmetalib version: {pivmetalib.__version__}")
🗺️ User Guide
Choose your path based on your background and goals:
New to PIV Metadata?
- Start with Getting Started Tutorial - Learn basic concepts
- Describe Your First Recording - Complete dataset workflow
- PIV Processing with OpenPIV - Processing pipeline documentation
- Result File Documentation - Publishing your results
Key Features
Comprehensive PIV Metadata
- Hardware Description: Digital cameras, lasers, optical components, objectives
- Software Documentation: PIV analysis tools, processing parameters, version control
- Experimental Setups: Virtual and experimental configurations
- Processing Pipelines: Complete PIV analysis workflows with provenance
Data Quality Management
- Flag Schemes: Flexible flag system for data quality indicators
- Validation: Built-in type checking and constraint validation
- Standard Names: Integration with PIV standard name tables for consistent terminology
Format Flexibility
- Multiple Exports: JSON-LD, Turtle (TTL), XML serialization
- Namespace Support: Integration with schema.org, PROV, DCAT, M4I ontologies
- Query Capabilities: SPARQL queries and data retrieval from JSON-LD files
FAIR Compliance
- Findable: Rich metadata with standardized identifiers
- Accessible: Multiple export formats for different tools
- Interoperable: Ontology-based approach for data exchange
- Reusable: Complete provenance and documentation
💡 Examples
🚀 Quick Examples
Describe PIV Software:
from pivmetalib import pivmeta, prov
software = pivmeta.PIVSoftware(
author=prov.Organization(name='OpenPIV'),
softwareVersion="0.26.0a0",
description='Open source Particle Image Velocimetry analysis software'
)
Export to Different Formats:
# JSON-LD
jsonld_data = software.serialize("jsonld")
# Turtle (TTL)
ttl_data = software.serialize("ttl")
# XML
xml_data = software.serialize("xml")
Query Existing Metadata:
from ontolutils import query
from pivmetalib.pivmeta import PIVSoftware
# Find all PIV software in a file
software_list = query(cls=PIVSoftware, source='metadata.jsonld')
📄 License
This project is licensed under the MIT License - see the LICENSE.md file for details.
🙏 Acknowledgments
- Built on ontolutils for ontology handling
- Integrates with pivmeta ontology for PIV metadata standards
- Uses ontologies from schema.org, PROV, DCAT, and M4I
Metadata
Release files for pivmetalib 3.1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pivmetalib-3.1.0.1.tar.gz | 34.9 kB | Without provenance | Details for pivmetalib-3.1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pivmetalib-3.1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pivmetalib-3.1.0.1-py3-none-any.whl |
Total release size: 62.6 kB
Release files / pivmetalib-3.1.0.1.tar.gz
| Download URL | pivmetalib-3.1.0.1.tar.gz |
|---|---|
| Size | 34.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
640b1ca3605977d753e9d8e5f9fd28cf5da40c13919ef418ac7f48971f47f15d
|
|
BLAKE2b-256 checksum How to use checksums |
ff6261cfa2e0b883fd2ab8c0cd0f033c2184f8348345a133331b6913745711f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Release files / pivmetalib-3.1.0.1-py3-none-any.whl
| Download URL | pivmetalib-3.1.0.1-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e48fe4dd6a4494de7977b8c114654b6d5f2e4f46ddcb35e9e7545c0bde62be76
|
|
BLAKE2b-256 checksum How to use checksums |
474cfc5a337c76c62de4a57d9dc3bcf737db65aee20cc98aba7a885c70dd0f65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Security for pivmetalib 3.1.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.