Metadata-Version: 2.3
Name: asyncfast
Version: 0.11.0
Summary: Add your description here
Author: jack.burridge
Author-email: jack.burridge <jack.burridge@mail.com>
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Framework :: AsyncIO
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: amgi-types==0.11.0
Requires-Dist: pydantic>=2.11.7
Requires-Dist: typer>=0.16.0
Requires-Python: >=3.9
Project-URL: Changelog, https://github.com/asyncfast/amgi/blob/main/CHANGELOG.md
Project-URL: Documentation, https://asyncfast.readthedocs.io/en/latest/
Project-URL: Homepage, https://github.com/asyncfast/amgi/tree/main/packages/asyncfast
Project-URL: Issues, https://github.com/asyncfast/amgi/issues/
Project-URL: Repository, https://github.com/asyncfast/amgi/
Description-Content-Type: text/markdown

# AsyncFast

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

## Installation

```
pip install asyncfast==0.11.0
```

## Example

Create a file `main.py` with:

```python
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](mailto:jack.burridge@mail.com).

## License

Copyright 2025 AMGI
