Skip to main content

Everything in between human- and machine-readable syndromes.

Project description

open-syndrome-python

PyPI - Version Test

Installation

You can install it from PyPI or from Docker.

From PyPi, install the package with pip install opensyndrome. Then run it with osi.

From Docker, you can run the following command to build the image, tagged osi:

docker build -t opensyndrome .

Run the container interactively, removing it when it exits

docker run --rm opensyndrome

To read a .env file, mount it:

docker run --rm -it \
  -v "$(pwd)/.env:/app/.env:ro" \
  opensyndrome

To name the container and keep it around:

docker run --name opensyndrome-cli -it opensyndrome

Usage

First, download the schema and definitions in order to work with the CLI locally.

osi download schema
osi download definitions

The files will be placed in the folder .open_syndrome in $HOME.

Convert a human-readable syndrome definition to a machine-readable JSON

You need to have Ollama installed locally to use this feature. Pull the models you want to use with osi before running the command. We have tested llama3.2, mistral, and deepseek-r1 so far.

Don't go well with structured output: qwen2.5-coder

osi convert
osi convert --model mistral

# to have the JSON translated to a specific language and edit it just after conversion
osi convert --language "Português do Brasil" --model mistral --edit

# include a validation step after conversion
osi convert --validate

Convert a machine-readable JSON syndrome definition to a human-readable format

osi humanize <path-to-json-file>
osi humanize <path-to-json-file> --model mistral
osi humanize <path-to-json-file> --model mistral --language "Português do Brasil"

Validate a machine-readable JSON syndrome definition

osi validate

Development

To get started with development, you need to have Poetry installed.

Install dependencies

uv sync

Generate Ollama-compatible JSON

You only need to do this if you are a maintainer adding a new OSI schema or updating an existing one.

Since Ollama requires a specific, more simple, JSON format, we need to generate an Ollama-compatible schema. To do this, we use datamodel-code-generator to generate a Pydantic schema. Run the following command to update it:

make ollama_schema

It will create a schema.py file in the root of the project. Be careful when editing this file manually.

Citing & Authors

If you find this repository helpful, feel free to cite our publication: The Open Syndrome Definition

@misc{ferreira2025opensyndromedefinition,
      title={The Open Syndrome Definition},
      author={Ana Paula Gomes Ferreira and Aleksandar Anžel and Izabel Oliva Marcilio de Souza and Helen Hughes and Alex J Elliot and Jude Dzevela Kong and Madlen Schranz and Alexander Ullrich and Georges Hattab},
      year={2025},
      eprint={2509.25434},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2509.25434},
}

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

opensyndrome-0.1.1.tar.gz (94.1 kB view details)

Uploaded Source

Built Distribution

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

opensyndrome-0.1.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file opensyndrome-0.1.1.tar.gz.

File metadata

  • Download URL: opensyndrome-0.1.1.tar.gz
  • Upload date:
  • Size: 94.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for opensyndrome-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5c990f2fe2a3ea70927b53dec9c59bd1d4e4030a2683c70cdb5e99aaeb0f25f1
MD5 6ab4914270849e8ff1d2503623ea1a20
BLAKE2b-256 c43da97299e404eb2a532990bd57dc96b51aed7197169b5f2d5c57fdb6789db9

See more details on using hashes here.

File details

Details for the file opensyndrome-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for opensyndrome-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0d3dd6f204c285a4d99cb38f944b9ca95ce8921e45d89653ff882c0a67216ff
MD5 1c24a1c4984655f4fd61f00a98a8ada7
BLAKE2b-256 78f4165bcc63f8c4952ce472c3423f7a9e9b1cd31b461685e482f473434505d5

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