Skip to main content

Argumentation Microservices for Python

Generated protobuf, gRPC, and Connect code of the arg-services Protobuf definitions for building complex argumentation machines. Documentation can be found at the Buf Schema Registry.

Build Locally

buf generate && uv build

Runtimes

All messages (*_pb2.py) use the official protobuf runtime. Install the extra for the RPC runtime you want to use, both share the same messages:

Extra Install Services Helpers
grpcio uv add arg-services[grpcio] *_pb2_grpc.py (grpcio) arg_services.grpcio
connectrpc uv add arg-services[connectrpc] *_connect.py (connectrpc) arg_services.connectrpc

Validation

arg_services.validation checks requests independently of the runtime and raises a ValidationError. Add the ValidationInterceptor of your runtime to report it as INVALID_ARGUMENT, e.g., serve(..., interceptors=[ValidationInterceptor()]). To pass the traceback of unhandled exceptions to gRPC clients, also add arg_services.grpcio.ExceptionInterceptor(). For asyncio servicers, use arg_services.grpcio.serve_async with AsyncValidationInterceptor() and AsyncExceptionInterceptor() instead.

from arg_services.validation import require_all

require_all(["texts", "config.language"], request)
require_all(["text"], *request.items)

Connect

Connect services are plain ASGI/WSGI applications that also speak gRPC, so existing gRPC clients keep working. gRPC clients and reflection need a server with HTTP/2 trailers such as pyvoy, Connect clients work with any server such as uvicorn or gunicorn. Since connectrpc-grpcreflect only supports protobuf-py, use arg_services.connectrpc.reflection_app to serve gRPC reflection.

from arg_services.connectrpc import ValidationInterceptor, reflection_app
from arg_services.nlp.v1 import nlp_pb2
from arg_services.nlp.v1.nlp_connect import NlpService, NlpServiceASGIApplication
from arg_services.validation import require_all
from connectrpc.request import RequestContext
from starlette.applications import Starlette
from starlette.routing import Mount


class Nlp(NlpService):
    async def vectors(
        self, request: nlp_pb2.VectorsRequest, ctx: RequestContext
    ) -> nlp_pb2.VectorsResponse:
        require_all(["texts"], request)

        return nlp_pb2.VectorsResponse()


nlp_app = NlpServiceASGIApplication(Nlp(), interceptors=[ValidationInterceptor()])
reflection = reflection_app(nlp_app)
app = Starlette(
    routes=[Mount(nlp_app.path, nlp_app), Mount(reflection.path, reflection)]
)

Metadata

Release files for arg-services 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arg-services 2.1.0
File Size Uploaded Provenance Actions
arg_services-2.1.0.tar.gz 92.3 kB With provenance Details for arg_services-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for arg-services 2.1.0
File Interpreter ABI Platform Actions
arg_services-2.1.0-py3-none-any.whl Python 3 none any Details for arg_services-2.1.0-py3-none-any.whl

Total release size: 238.8 kB

Release files / arg_services-2.1.0.tar.gz

Download URL arg_services-2.1.0.tar.gz
Size 92.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e23ad9ee9a9cc8bf5bba1608a924486b3bf49a463c2dd857333768806cb93a30
BLAKE2b-256 checksum
How to use checksums
9105f35d76c21e70f0b2d73e13008c4528e31588913419a66aa927e2f0e98610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / arg_services-2.1.0-py3-none-any.whl

Download URL arg_services-2.1.0-py3-none-any.whl
Size 146.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67b0c122c3ed205078177403e3bc6de5986152fe4bbe01850e3a8106fc743c5b
BLAKE2b-256 checksum
How to use checksums
123707d8ef5bd4413f893c3abcf0154c6716129eb9b2a1a09613e351912a5ba3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for arg-services 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for arg_services-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page