Metadata-Version: 2.4
Name: biors
Version: 0.47.4
Summary: Python bindings for bio-rs core
License: MIT OR Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# biors-python

Python bindings for [bio-rs](https://github.com/bio-rs/bio-rs) via PyO3.

## Installation

```bash
pip install biors
```

Requires Python 3.9+.

## Quickstart

```python
import biors

fasta_text = (
    ">seq1\nACDEFGHIKLMNPQRSTVWY\n"
    ">seq2\nMKWVTFISLLFLFSSAYSRGVFRRDAHKSEVAHRFKDLGEENFKALVLIAFAQYLQQCP\n"
)

# Parse FASTA text
records = biors.parse_fasta_records(fasta_text)

# Validate
report = biors.validate_fasta_input(fasta_text)
print(f"Valid records: {report.valid_records}/{report.records}")

# Tokenize
tokenized = biors.tokenize_fasta_records(fasta_text)
for t in tokenized:
    print(t.id, t.tokens)

# Build model input
model_input = biors.build_model_inputs_checked(
    tokenized,
    max_length=512,
    pad_token_id=0,
    padding="fixed_length",
)
for r in model_input.records:
    print(r.id, r.input_ids, r.attention_mask)

# End-to-end workflow
output = biors.prepare_workflow(
    input_hash="sha256:abc123",
    records=records,
    max_length=512,
    pad_token_id=0,
    padding="fixed_length",
)
print(f"Model ready: {output.model_ready}")
```

## Development

Build locally with maturin:

```bash
cd packages/rust/biors-python
maturin develop
pytest
```

## License

MIT OR Apache-2.0

