{"library":"pipestat","title":"Pipeline Status Reporter","description":"pipestat is a Python library that acts as a pipeline results reporter. It provides a flexible way to manage and track the status and outputs of computational pipelines, supporting various backends like YAML files, SQLite databases, and Pephub. The current version is 0.13.1, and it maintains a regular release cadence, with several minor versions and patches released annually.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install pipestat"],"cli":{"name":"pipestat","version":"pipestat 0.13.1"}},"imports":["from pipestat import PipestatManager"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nimport tempfile\n\nfrom pipestat import PipestatManager\n\n# Create dummy config and schema files in a temporary directory\ntmpdir = tempfile.TemporaryDirectory()\nconfig_file_path = os.path.join(tmpdir.name, \"pipestat_config.yaml\")\nschema_file_path = os.path.join(tmpdir.name, \"results_schema.yaml\")\ndb_file_path = os.path.join(tmpdir.name, \"pipestat_test.sqlite\")\n\nconfig_content = f\"\"\"\ndatabase:\n  db_file: {db_file_path}\npipeline_name: my_pipeline\nschema_path: {schema_file_path}\n\"\"\"\nwith open(config_file_path, \"w\") as f:\n    f.write(config_content)\n\nschema_content = \"\"\"\nproperties:\n  sample_name:\n    type: string\n  my_result:\n    type: string\n  my_numeric_result:\n    type: number\nrequired:\n  - sample_name\n  - my_result\n\"\"\"\nwith open(schema_file_path, \"w\") as f:\n    f.write(schema_content)\n\n# Initialize PipestatManager\npsm = PipestatManager(\n    config_file=config_file_path,\n    schema_path=schema_file_path\n)\n\n# Report a result\nrecord_identifier = \"sample1\"\nresult_name = \"my_result\"\nresult_value = \"SUCCESS\"\npsm.report(record_identifier=record_identifier, result_name=result_name, value=result_value)\n\n# Report another result\npsm.report(record_identifier=record_identifier, result_name=\"my_numeric_result\", value=123.45)\n\nprint(f\"Reported '{result_name}' for '{record_identifier}' as '{result_value}'\")\n\n# Retrieve results\nretrieved_result = psm.retrieve(record_identifier=record_identifier, result_name=result_name)\nprint(f\"Retrieved '{result_name}' for '{record_identifier}': {retrieved_result}\")\n\n# Clean up\ntmpdir.cleanup()\n","lang":"python","description":"This quickstart demonstrates how to initialize `PipestatManager` with a configuration and schema, report a result for a record, and then retrieve it. It uses temporary files for the configuration and schema to keep it self-contained and runnable.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}