Skip to main content

The world's first universal framework for standardized data digitization

Project description

airalogy

The world's first universal framework for standardized data digitization

Key Features

Airalogy lets you create fully custom protocols (Airalogy Protocols) for defining how data is collected, validated, and processed.

Area Highlights
Airalogy Markdown Define rich, custom data fields directly in Markdown—variables ({{var}}), procedural steps ({{step}}), checkpoints ({{check}}), and more.
Model-based Data Validation Attach a model to every protocol for strict type checking—supports datetime, enums, nested models, lists, etc.; and Airalogy-specific built-in types (UserName, CurrentTime, AiralogyMarkdown, file IDs, ...).
Assigner for Auto-Computation Use the declarative @assigner decorator to compute field values automatically.

Requirements

Python ≥ 3.12

Installation

pip install airalogy

Quick Start

Create a Protocol

protocol/
├─ protocol.aimd  # Airalogy Markdown
├─ model.py       # Optional: Define data validation model
└─ assigner.py    # Optional: Define auto-computation logic

protocol.aimd

# Reagent preparation
Solvent name: {{var|solvent_name}}
Target solution volume (L): {{var|target_solution_volume}}
Solute name: {{var|solute_name}}
Solute molar mass (g/mol): {{var|solute_molar_mass}}
Target molar concentration (mol/L): {{var|target_molar_concentration}}
Required solute mass (g): {{var|required_solute_mass}}

model.py

from pydantic import BaseModel, Field

class VarModel(BaseModel):
    solvent_name: str
    target_solution_volume: float = Field(gt=0)
    solute_name: str
    solute_molar_mass: float = Field(gt=0)
    target_molar_concentration: float = Field(gt=0)
    required_solute_mass: float = Field(gt=0)

assigner.py

from airalogy.assigner import AssignerBase, AssignerResult, assigner


class Assigner(AssignerBase):
    @assigner(
        assigned_fields=["required_solute_mass"],
        dependent_fields=[
            "target_solution_volume",
            "solute_molar_mass",
            "target_molar_concentration",
        ],
        mode="auto",
    )
    def calculate_required_solute_mass(dependent_fields: dict) -> AssignerResult:
        target_solution_volume = dependent_fields["target_solution_volume"]
        solute_molar_mass = dependent_fields["solute_molar_mass"]
        target_molar_concentration = dependent_fields["target_molar_concentration"]

        required_solute_mass = (
            target_solution_volume * target_molar_concentration * solute_molar_mass
        )

        return AssignerResult(
            assigned_fields={
                "required_solute_mass": required_solute_mass,
            },
        )

Development Setup

We use pdm for dependency management, ruff for lint/format, and hatchling for builds.

Testing

pytest

License

Apache 2.0

Cite This Framework

@misc{yang2025airalogyaiempowereduniversaldata,
      title={Airalogy: AI-empowered universal data digitization for research automation}, 
      author={Zijie Yang and Qiji Zhou and Fang Guo and Sijie Zhang and Yexun Xi and Jinglei Nie and Yudian Zhu and Liping Huang and Chou Wu and Yonghe Xia and Xiaoyu Ma and Yingming Pu and Panzhong Lu and Junshu Pan and Mingtao Chen and Tiannan Guo and Yanmei Dou and Hongyu Chen and Anping Zeng and Jiaxing Huang and Tian Xu and Yue Zhang},
      year={2025},
      eprint={2506.18586},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2506.18586}, 
}

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

airalogy-0.0.3.tar.gz (61.2 kB view details)

Uploaded Source

Built Distribution

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

airalogy-0.0.3-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file airalogy-0.0.3.tar.gz.

File metadata

  • Download URL: airalogy-0.0.3.tar.gz
  • Upload date:
  • Size: 61.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.4 CPython/3.12.2 Darwin/24.5.0

File hashes

Hashes for airalogy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8d0fa0824f60ede3d2b524fff5188c6cea962b6cae7773dcb4d7cd3fc7ca05df
MD5 6b08eaea3c9e45acc59153b9b11a552e
BLAKE2b-256 38f8193bb3aff7b2c70f6d7276e7bf5056d5b6212d720ceb01db49eb2fb05614

See more details on using hashes here.

File details

Details for the file airalogy-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: airalogy-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.4 CPython/3.12.2 Darwin/24.5.0

File hashes

Hashes for airalogy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2998a65652230be13e8a7f793c450eb2b9e9f378df0e31a6c169ed61ab1ceda0
MD5 41bae253b8ffac6f527f1327d474beed
BLAKE2b-256 c5530cfa6eaac1f5fb441ee3c3e14fde2b17f18eac85e9ca53ae5be040c6d242

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