Skip to main content

ASGI transport runner for Swarmauri components using Uvicorn.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri-transport-asgi


Swarmauri Transport – ASGI Server

swarmauri-transport-asgi boots an in-process Uvicorn server so transports can expose ASGI applications without leaving the Swarmauri runtime. Use it when you need to mount FastAPI, Starlette, or other ASGI-compatible apps alongside agents.

Installation

Using uv

uv pip install swarmauri-transport-asgi --index-url https://pypi.org/simple

Using pip

pip install swarmauri-transport-asgi

Usage

import asyncio
from fastapi import FastAPI
from swarmauri_transport_asgi import ASGITransport

api = FastAPI()

@api.get("/ping")
async def ping() -> dict[str, str]:
    return {"message": "pong"}

async def main() -> None:
    transport = ASGITransport(app=api)
    async with transport.server(host="0.0.0.0", port=8000):
        await asyncio.Event().wait()

asyncio.run(main())

Configure Uvicorn parameters such as TLS context or worker count through the server(...) context manager arguments.

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

swarmauri_transport_asgi-0.1.1.dev19.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file swarmauri_transport_asgi-0.1.1.dev19.tar.gz.

File metadata

  • Download URL: swarmauri_transport_asgi-0.1.1.dev19.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_transport_asgi-0.1.1.dev19.tar.gz
Algorithm Hash digest
SHA256 65ca8fca5adbbf3806df17fb03aa75ceac6ece054ad07dcf8c89b647222e4254
MD5 73ba7f96a2f22e7b5ec10828c2730f4e
BLAKE2b-256 2d74a6ced76a9833c90952b6ffb387730ad51b6a7d7e6315b1431e5f8e8b70ac

See more details on using hashes here.

File details

Details for the file swarmauri_transport_asgi-0.1.1.dev19-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_transport_asgi-0.1.1.dev19-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_transport_asgi-0.1.1.dev19-py3-none-any.whl
Algorithm Hash digest
SHA256 8157b6b8eaad26b550c3d6fa43a2175d4977e507497aecd8bf52b65ada037817
MD5 d6b73e5176f672a8c0086b237a98e0e2
BLAKE2b-256 716ff39fa21cdbd924f522170a6b15b82c4063f405f4fc45b0f0a8e1536e4bca

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