semvec/pypi-packages huggingface dataset:
londonaicentre-oncollama-assets 1.0.5
OncoLlama assets
Requires Python: >=3.12

# OncoLlama Assets

Assets for OncoLlama: Generating high fidelity synthetic cancer letters, and fine-tuning LLMs for structured data extraction.

## Features

This package primarily exposes the **OncoLlama schema** for runtime output validation. Use it to:

- **Validate LLM outputs** against the expected OncoLlama structure
- **Generate JSON schemas** for API contracts and documentation
- **Parse and validate** extracted oncology data at runtime

### Schema Access

Access the Pydantic model and its JSON schema:

```python
from oncollama_assets.schema import OncoLlamaModel

# Get the JSON schema for validation
schema = OncoLlamaModel.model_json_schema()

# Parse and validate deserialised output
data = OncoLlamaModel.model_validate(llm_output)
# Parse and validate deserialised json string
data = OncoLlamaModel.model_validate_json(llm_output)
```

### System Prompts

Load system prompts with the schema automatically injected:

```python
from oncollama_assets.wrapper import OncoLlamaAssets

assets = OncoLlamaAssets()

# Load inference system prompt (default)
system_prompt = assets.load_system_prompt()

# Or specify a different prompt template
system_prompt = assets.load_system_prompt("systemprompt_finetune.md")
```

Available prompt templates:
- `systemprompt_infer.md` - For inference (default)
- `systemprompt_finetune.md` - For fine-tuning
- `systemprompt_datagen.md` - For data generation

### Wrapper Class (Internal Use)

The `OncoLlamaAssets` wrapper class also provides testing and internal release mechanisms.

## Structure

```text
📁 ONCOLLAMA_ASSETS
├── prompts/             # Prompt templates
├── schema.py            # Pydantic model for specifying expected OncoLlama output structure
├── wrapper.py           # Wrapper class for internal testing and release mechanisms
```

## License

This project uses a proprietary license (see [LICENSE](LICENSE.md)).
accelerator-middle-layer 0.2.3
Python Accelerator Middle Layer
Requires Python: >=3.11
Keywords: Accelerator, Commissioning, Digital Twin, Operation, Synchrotron, Tuning

[![Documentation Status](https://readthedocs.org/projects/pyaml/badge/?version=latest)](https://pyaml.readthedocs.io/en/latest/?badge=latest)
![Current release](https://img.shields.io/github/v/tag/python-accelerator-middle-layer/pyaml)

# Python Accelerator Middle Layer

Python Accelerator Middle Layer (pyAML) is a joint technology platform for design, commissioning and operation of particle accelerators.

The code is still under development. The features include among others:

- A control system agnostic interface to interact with the accelerator.
- Same interface to different backends: live accelerator, virtual accelerator and simulator.
- Machine independence allowing configuration of different type of accelerators and facility specific naming conventions.
- Unit conversions.
- Automatic generation of metadata and standardized format for measurement data.
- A set of standard applications and a framework for developing new applications.

**This repository is for the core of pyAML.** It is control system independent and provides the core functionality of pyAML. It is intended to be used together with a package that implements the control system specific interface.

Available packages for bindings:

TANGO: [tango-pyaml](https://github.com/python-accelerator-middle-layer/tango-pyaml)
TANGO or EPICS: [pyaml-cs-oa](https://github.com/python-accelerator-middle-layer/pyaml-cs-oa)

#### Installation

Installation instructions for both user and development installation can be found in the [documentation](https://pyaml.readthedocs.io/en/latest/?badge=latest).

#### Documentation

The documentation is available [here](https://pyaml.readthedocs.io/en/latest/?badge=latest).

In the documentation there are both examples and Jupyter notebooks available for how to use the package.
tango-pyaml 0.3.3
Bridge between Tango and PyAML
Requires Python: >=3.11
Keywords: Accelerator, Commissioning, Digital Twin, Operation, Synchrotron, Tango, Tuning

# tango-pyaml

**Bridge between **[**Tango Controls**](https://www.tango-controls.org/)** and PyAML**



## Overview

`tango-pyaml` is a Python bridge between the [Tango control system](https://www.tango-controls.org/) and the [PyAML](https://github.com/python-accelerator-middle-layer/pyaml) abstraction layer for control systems. It provides a set of classes that allow Tango attributes and devices to be accessed and controlled using PyAML concepts.

This library is part of the **Python Accelerator Middle Layer (PyAML)** ecosystem.

## Features

- ✅ Read and write Tango attributes via a unified PyAML interface
- 🔁 Support for read-only and read/write attributes
- 📊 Grouped attribute operations using `tango.Group`
- 💥 Exception mapping from Tango exceptions to PyAML exceptions
- 🧹 Designed to integrate seamlessly with PyAML `ControlSystem` components
- 🧪 Mocked devices for unit testing without Tango runtime

## Installation

```bash
pip install tango-pyaml
```

## Requirements

- Python >= 3.9
- [PyTango](https://pytango.readthedocs.io/en/latest/) >= 9.5.1
- [PyAML](https://github.com/python-accelerator-middle-layer/pyaml)
- [pydantic](https://docs.pydantic.dev/) >= 2.0

For development and testing:

```bash
pip install tango-pyaml[dev]
```

## Usage Example

This is an example of an explicit call to a Tango attribute using PyAML. For more details about implicit declaration and broader configuration options, please refer to the [PyAML documentation](https://github.com/python-accelerator-middle-layer/pyaml).

Configuration file `attribute.yaml`:

```yaml
attribute: "sys/tg_test/1/float_scalar"
unit: "A"
```

Python code:

```python
from tango.pyaml.attribute import Attribute
from tango.pyaml.tango_attribute import ConfigModel
import yaml

with open("attribute.yaml") as f:
    cfg_dict = yaml.safe_load(f)

cfg = ConfigModel(**cfg_dict)
attr = Attribute(cfg)

attr.set(10.0)
value = attr.get()
readback = attr.readback()

print(f"Value: {value}, Readback: {readback.value} [{readback.quality}]")
```

## Available Classes

- `Attribute` — Read/write access to a Tango attribute
- `AttributeReadOnly` — Read-only attribute wrapper
- `AttributeList` — Manage a group of attributes from multiple devices
- `TangoControlSystem` — Adapter to configure global Tango control system context

## Testing

Tests rely on mocked Tango devices and attributes using `unittest.mock`. To run tests:

```bash
pytest
```

## Project Structure

- `tango.pyaml.attribute` – Main attribute interface
- `tango.pyaml.attribute_read_only` – Read-only attribute implementation
- `tango.pyaml.attribute_list` – Attribute groups with `tango.Group`
- `tango.pyaml.tango_attribute` – Base class wrapping attribute logic
- `mocked_device_proxy.py` – In-memory mock for Tango `DeviceProxy` and `AttributeProxy`

## License

This project is licensed under the MIT License.

## Links

- 🧺 [Repository](https://github.com/python-accelerator-middle-layer/tango-pyaml)