Skip to main content

Add your description here

Project description

AsyncFast

AsyncFast is a modern, event framework for building APIs with Python based on standard Python type hints.

Installation

pip install asyncfast==0.15.0

Example

Create a file main.py with:

from asyncfast import AsyncFast
from pydantic import BaseModel

app = AsyncFast()


class Payload(BaseModel):
    id: str
    name: str


@app.channel("topic")
async def on_topic(payload: Payload) -> None:
    print(payload)

Running

To run the app install an AMGI server (at the moment there is only amgi-aiokafka) then run:

$ asyncfast run amgi-aiokafka main:app topic

AsyncAPI Generation

$ asyncfast asyncapi main:app
{
  "asyncapi": "3.0.0",
  "info": {
    "title": "AsyncFast",
    "version": "0.1.0"
  },
  "channels": {
    "OnTopic": {
      "address": "topic",
      "messages": {
        "OnTopicMessage": {
          "$ref": "#/components/messages/OnTopicMessage"
        }
      }
    }
  },
  "operations": {
    "receiveOnTopic": {
      "action": "receive",
      "channel": {
        "$ref": "#/channels/OnTopic"
      }
    }
  },
  "components": {
    "messages": {
      "OnTopicMessage": {
        "payload": {
          "$ref": "#/components/schemas/Payload"
        }
      }
    },
    "schemas": {
      "Payload": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "Payload",
        "type": "object"
      }
    }
  }
}

Contact

For questions or suggestions, please contact jack.burridge@mail.com.

License

Copyright 2025 AMGI

Download files

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

Source Distribution

asyncfast-0.15.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

asyncfast-0.15.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file asyncfast-0.15.0.tar.gz.

File metadata

  • Download URL: asyncfast-0.15.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.4

File hashes

Hashes for asyncfast-0.15.0.tar.gz
Algorithm Hash digest
SHA256 26b4315e6939daa7963f78ea8523f04f038ccffc28a565a51ac6c4f459d6a585
MD5 9e7ee2258ab318257ef690d87c58a4e2
BLAKE2b-256 e22beafd98f0c11f3944f707b65c6bcb354c14882af8cac07c7b828bfbd3fa4f

See more details on using hashes here.

File details

Details for the file asyncfast-0.15.0-py3-none-any.whl.

File metadata

File hashes

Hashes for asyncfast-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6fc87d8fa4f53063f200c5185b3cdca88b59b9a16077a9136f150a98cb0a96d
MD5 ef6863447395525f2113eed46c2cc389
BLAKE2b-256 e2c8d8d7e3c7c06f9c1c5c92892b0ff050cd6174cb64981a402062d3ed4e5b90

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