Registry / data / peppy
library0.40.8pypypi✓ verified 85d ago

peppy is the official Python package for reading Portable Encapsulated Projects (PEPs). It provides a Python interface for managing project metadata, including samples and their attributes. The library facilitates loading, validating, and interacting with PEP-formatted metadata. The current stable version is 0.40.8, with significant breaking changes anticipated in the upcoming 0.50.0aX releases. It maintains an active development and release cadence.

pip install peppy
INSTALL
IMPORT
SIG · PEPPY
P
peppy
datapythonv0.40.8
Install
11.7s avg
Import
1217ms
Disk
196MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.40.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 1.248s · 195.6MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 11.7s · import 1.186s · 188MB
196MB installed
● package 196MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Project
from peppy import Project

Demonstrates how to initialize a `peppy.Project` object from a configuration file and access its samples and their attributes. Users should provide their own PEP configuration file.

import os from peppy import Project # For a runnable example, clone the example_peps repository: # git clone https://github.com/pepkit/example_peps.git # and adjust the path below to 'example_peps/example_basic/project_config.yaml' # Placeholder for a project configuration file (YAML or CSV). # In a real scenario, replace with the actual path to your PEP config. project_path = os.environ.get('PEPPY_PROJECT_CONFIG', 'path/to/your/project_config.yaml') try: # Instantiate an in-memory Project representation prj = Project(cfg=project_path) print(f"Successfully loaded Project: '{prj.name}'") print(f"Number of samples: {len(prj.samples)}") if prj.samples: first_sample = prj.samples[0] print(f"\nFirst sample name: {first_sample.sample_name}") # Access a sample attribute, e.g., 'protocol' or 'file' if 'protocol' in first_sample: print(f"First sample's protocol: {first_sample.protocol}") else: print("No samples found in the project.") except FileNotFoundError: print(f"Error: Project configuration file not found at '{project_path}'.") print("Please ensure the path is correct or clone a PEP example.") except Exception as e: print(f"An error occurred during project loading: {e}")
peppy --version
Debug
Known issues
breakingStarting from version 0.50.0a1, functionality previously provided by external `pephubclient` and `eido` libraries has been merged directly into `peppy`. Code relying on direct imports or usage of these separate packages for PEP-related operations will break.
fix
Review the `peppy` documentation for 0.50.0aX to understand how merged functionalities are accessed internally. Remove direct `pephubclient` and `eido` imports related to PEP processing.
affects: >=0.50.0a1
breakingThe command-line interface (CLI) in `peppy` has been completely revamped and switched to `typer` in version 0.50.0a1. Existing CLI commands will no longer work as before.
fix
Consult the updated CLI documentation for version 0.50.0aX to learn the new command structure and usage with `typer`.
affects: >=0.50.0a1
gotchaProject initialization (`peppy.Project(cfg=...)`) requires a correctly formatted PEP configuration file (typically YAML) that points to a sample table. Incorrect paths, malformed YAML, or missing files are common issues leading to errors.
fix
Ensure the `cfg` path is absolute or correctly relative to the current working directory. Validate your YAML file for syntax errors and confirm that all referenced files (like `sample_table.csv`) exist and are accessible. Refer to the PEP specification for correct format.
affects: <0.50.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'peppy'
The 'peppy' library is not installed in the current Python environment.
fix
Install the library using pip: `pip install peppy`
FileNotFoundError: [Errno 2] No such file or directory: 'path/to/project_config.yaml'
The configuration file specified during `Project` initialization either does not exist or the provided path is incorrect.
fix
Verify that the `project_config.yaml` file exists at the specified path. Use an absolute path or ensure the relative path is correct from where your script is run. Consider cloning the `pepkit/example_peps` repository for test data.
AttributeError: 'Project' object has no attribute 'samples' (or similar errors when accessing project/sample data)
This often occurs if the project configuration (e.g., `sample_table.csv`) is empty, malformed, or if `defer_samples_creation=True` was used without subsequently creating samples.
fix
Review your `project_config.yaml` and associated sample table(s) to ensure they correctly define samples. If you initialized with `defer_samples_creation=True`, call `prj.create_samples()` before attempting to access `prj.samples`.
Upgrade
Version history
0.40.8latest on PyPI · released Oct 20, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources