{"id":7495,"library":"peppy","title":"peppy","description":"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.","status":"active","version":"0.40.8","language":"python","source_language":"en","source_url":"https://github.com/pepkit/peppy/","tags":["data management","metadata","bioinformatics","PEP","project management"],"install":[{"cmd":"pip install peppy","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"Project","correct":"from peppy import Project"}],"quickstart":{"code":"import os\nfrom peppy import Project\n\n# For a runnable example, clone the example_peps repository:\n# git clone https://github.com/pepkit/example_peps.git\n# and adjust the path below to 'example_peps/example_basic/project_config.yaml'\n\n# Placeholder for a project configuration file (YAML or CSV).\n# In a real scenario, replace with the actual path to your PEP config.\nproject_path = os.environ.get('PEPPY_PROJECT_CONFIG', 'path/to/your/project_config.yaml')\n\ntry:\n    # Instantiate an in-memory Project representation\n    prj = Project(cfg=project_path)\n    print(f\"Successfully loaded Project: '{prj.name}'\")\n    print(f\"Number of samples: {len(prj.samples)}\")\n\n    if prj.samples:\n        first_sample = prj.samples[0]\n        print(f\"\\nFirst sample name: {first_sample.sample_name}\")\n        # Access a sample attribute, e.g., 'protocol' or 'file'\n        if 'protocol' in first_sample:\n            print(f\"First sample's protocol: {first_sample.protocol}\")\n    else:\n        print(\"No samples found in the project.\")\n\nexcept FileNotFoundError:\n    print(f\"Error: Project configuration file not found at '{project_path}'.\")\n    print(\"Please ensure the path is correct or clone a PEP example.\")\nexcept Exception as e:\n    print(f\"An error occurred during project loading: {e}\")","lang":"python","description":"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."},"warnings":[{"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.","message":"Starting 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.","severity":"breaking","affected_versions":">=0.50.0a1"},{"fix":"Consult the updated CLI documentation for version 0.50.0aX to learn the new command structure and usage with `typer`.","message":"The 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.","severity":"breaking","affected_versions":">=0.50.0a1"},{"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.","message":"Project 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.","severity":"gotcha","affected_versions":"<0.50.0"}],"env_vars":null,"search_vec":"'0.40.8':45 '0.50.0':54 'activ':60 'anticip':50 'attribut':27 'ax':55 'bioinformat':68 'break':48 'cadenc':64 'chang':49 'current':41 'data':65 'develop':61 'encapsul':11 'facilit':30 'format':38 'includ':23 'interact':34 'interfac':18 'librari':29 'load':31 'maintain':58 'manag':20,66,71 'metadata':22,39,67 'offici':5 'packag':7 'pep':13,37,69 'pep-format':36 'peppi':1,2 'portabl':10 'project':12,21,70 'provid':15 'python':6,17 'read':9 'releas':56,63 'sampl':24 'signific':47 'stabl':42 'upcom':53 'valid':32 'version':43","created_at":"2026-04-16T14:00:45.787007+00:00","updated_at":"2026-04-16T14:00:45.787007+00:00","problems":[{"fix":"Install the library using pip: `pip install peppy`","cause":"The 'peppy' library is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'peppy'"},{"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.","cause":"The configuration file specified during `Project` initialization either does not exist or the provided path is incorrect.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'path/to/project_config.yaml'"},{"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`.","cause":"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.","error":"AttributeError: 'Project' object has no attribute 'samples' (or similar errors when accessing project/sample data)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.40.8","cli_name":"peppy","cli_version":"sh: 1: peppy: not found","type":"library","homepage":"https://pepkit.github.io/peppy/","github":"https://github.com/pepkit/peppy","docs":null,"changelog":null,"pypi":"https://pypi.org/project/peppy/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization","workflow"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}