Skip to main content

Data transformation framework for LinkML data models

Project description

Koza - Knowledge Graph Transformation and Operations Toolkit

Pyversions PyPi Github Action

pupa

Documentation

Overview

Koza is a Python library and CLI tool for transforming biomedical data and performing graph operations on Knowledge Graph Exchange (KGX) files. It provides two main capabilities:

📊 Graph Operations (New!)

Powerful DuckDB-based operations for KGX knowledge graphs:

  • Join multiple KGX files with schema harmonization
  • Split files by field values with format conversion
  • Prune dangling edges and handle singleton nodes
  • Append new data to existing databases with schema evolution
  • Multi-format support for TSV, JSONL, and Parquet files

🔄 Data Transformation (Core)

Transform biomedical data sources into KGX format:

  • Transform csv, json, yaml, jsonl, and xml to target formats
  • Output in KGX format
  • Write data transforms in semi-declarative Python
  • Configure source files, columns/properties, and metadata in YAML
  • Create mapping files and translation tables between vocabularies

Installation

Koza is available on PyPi and can be installed via pip/pipx:

[pip|pipx] install koza

Usage

See the Koza documentation for complete usage information.

Key Features

🔧 Multi-Format Support

  • Native support for TSV, JSONL, and Parquet KGX files
  • Automatic format detection and conversion
  • Mixed-format operations in single commands

🛡️ Schema Flexibility

  • Automatic schema harmonization across heterogeneous files
  • Schema evolution with backward compatibility
  • Comprehensive schema reporting and validation

High Performance

  • DuckDB-powered operations for fast bulk processing
  • Memory-efficient handling of large knowledge graphs
  • Parallel processing and streaming where possible

🔍 Rich CLI Experience

  • Progress indicators for long-running operations
  • Detailed statistics and operation summaries
  • Dry-run modes for safe operation preview

🧹 Data Integrity

  • Dangling edge detection and preservation
  • Duplicate detection and removal strategies
  • Non-destructive operations with data archiving

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

koza-2.6.1.tar.gz (435.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

koza-2.6.1-py3-none-any.whl (168.2 kB view details)

Uploaded Python 3

File details

Details for the file koza-2.6.1.tar.gz.

File metadata

  • Download URL: koza-2.6.1.tar.gz
  • Upload date:
  • Size: 435.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.22

File hashes

Hashes for koza-2.6.1.tar.gz
Algorithm Hash digest
SHA256 376fce55541a7ace62b6f24242e1cb5a8a16ac4d49f8dba3c7626f815b2c55e5
MD5 69d9c9de2feb75e4fba20973aab7c5ee
BLAKE2b-256 f6b01c151142a80ad37cf23839a0e932457b15736667952762b84e7a36fba69f

See more details on using hashes here.

File details

Details for the file koza-2.6.1-py3-none-any.whl.

File metadata

  • Download URL: koza-2.6.1-py3-none-any.whl
  • Upload date:
  • Size: 168.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.22

File hashes

Hashes for koza-2.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d0fbe20d4ce545a6926fc888d2f7de5da017a0abedc2ec39430156e15cd3c95
MD5 a534b85ef8149b7061553113da7db677
BLAKE2b-256 d2e75b4f3ae558f104560cbb9d07158cedbd3cbd6381c1152ad65d2a5cddd6c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page