Skip to main content

scitrera-messaging-spec

Python reference implementation of the Scitrera Ecosystem Messaging Spec (v1.0).

from scitrera_messaging_spec import (
    ChatMessage, TextPart, ToolCallPart, ToolResultPart,
    apply_event, MessageStarted, PartAppended, TokenDelta,
    to_openai_chat_completion,
)

m = ChatMessage(
    id="msg_1",
    role="assistant",
    content=[
        TextPart(text="hello"),
        ToolCallPart(id="c1", name="get_time", args={}, status="completed"),
        ToolResultPart(call_id="c1", output_text="3pm"),
    ],
)
print(m.model_dump_json())

See the spec for the normative shape.

Install

pip install scitrera-messaging-spec

Or, for local development, from a checkout:

pip install -e python

Download files

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

Source Distribution

scitrera_messaging_spec-1.2.6.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

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

scitrera_messaging_spec-1.2.6-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file scitrera_messaging_spec-1.2.6.tar.gz.

File metadata

  • Download URL: scitrera_messaging_spec-1.2.6.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for scitrera_messaging_spec-1.2.6.tar.gz
Algorithm Hash digest
SHA256 a37affedb8cdd22fd3c03ff174695c51fdd999f9542d3a8ce9c05f4532a9b635
MD5 931521559f941afe810770021eded043
BLAKE2b-256 6ee9340fd53a9665dc55d860bb2fe42e0285d212ba4fb724d73740e41b296b3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitrera_messaging_spec-1.2.6.tar.gz:

Publisher: publish-python.yml on scitrera/ecosystem-messaging-spec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitrera_messaging_spec-1.2.6-py3-none-any.whl.

File metadata

File hashes

Hashes for scitrera_messaging_spec-1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 bda21741cb1b55b44f73afd7863d513ac67da8d78000a641b0de1a4c3f329836
MD5 23aca841c1fbd54396660aab689fda77
BLAKE2b-256 269b4ad52ba9ca3eacaf16f2757357863c62b46c766ae87709c13cac64bd1ad2

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitrera_messaging_spec-1.2.6-py3-none-any.whl:

Publisher: publish-python.yml on scitrera/ecosystem-messaging-spec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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