asyncfast


Nameasyncfast JSON
Version 0.12.0 PyPI version JSON
download
home_pageNone
SummaryAdd your description here
upload_time2025-08-31 20:54:37
maintainerNone
docs_urlNone
authorjack.burridge
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AsyncFast

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

## Installation

```
pip install asyncfast==0.12.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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "asyncfast",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "jack.burridge",
    "author_email": "jack.burridge <jack.burridge@mail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0f/d9/3b333bcd2ed15f6e41d84b1801d0f31941be4bd3d4f938601f43bc96bd3d/asyncfast-0.12.0.tar.gz",
    "platform": null,
    "description": "# AsyncFast\n\nAsyncFast is a modern, event framework for building APIs with Python based on standard Python type hints.\n\n## Installation\n\n```\npip install asyncfast==0.12.0\n```\n\n## Example\n\nCreate a file `main.py` with:\n\n```python\nfrom asyncfast import AsyncFast\nfrom pydantic import BaseModel\n\napp = AsyncFast()\n\n\nclass Payload(BaseModel):\n    id: str\n    name: str\n\n\n@app.channel(\"topic\")\nasync def on_topic(payload: Payload) -> None:\n    print(payload)\n```\n\n### Running\n\nTo run the app install an AMGI server (at the moment there is only `amgi-aiokafka`) then run:\n\n```\n$ asyncfast run amgi-aiokafka main:app topic\n```\n\n### AsyncAPI Generation\n\n```\n$ asyncfast asyncapi main:app\n{\n  \"asyncapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"AsyncFast\",\n    \"version\": \"0.1.0\"\n  },\n  \"channels\": {\n    \"OnTopic\": {\n      \"address\": \"topic\",\n      \"messages\": {\n        \"OnTopicMessage\": {\n          \"$ref\": \"#/components/messages/OnTopicMessage\"\n        }\n      }\n    }\n  },\n  \"operations\": {\n    \"receiveOnTopic\": {\n      \"action\": \"receive\",\n      \"channel\": {\n        \"$ref\": \"#/channels/OnTopic\"\n      }\n    }\n  },\n  \"components\": {\n    \"messages\": {\n      \"OnTopicMessage\": {\n        \"payload\": {\n          \"$ref\": \"#/components/schemas/Payload\"\n        }\n      }\n    },\n    \"schemas\": {\n      \"Payload\": {\n        \"properties\": {\n          \"id\": {\n            \"title\": \"Id\",\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"title\": \"Name\",\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"id\",\n          \"name\"\n        ],\n        \"title\": \"Payload\",\n        \"type\": \"object\"\n      }\n    }\n  }\n}\n```\n\n## Contact\n\nFor questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).\n\n## License\n\nCopyright 2025 AMGI\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Add your description here",
    "version": "0.12.0",
    "project_urls": {
        "Changelog": "https://github.com/asyncfast/amgi/blob/main/CHANGELOG.md",
        "Documentation": "https://asyncfast.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/asyncfast/amgi/tree/main/packages/asyncfast",
        "Issues": "https://github.com/asyncfast/amgi/issues/",
        "Repository": "https://github.com/asyncfast/amgi/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4c21d213ba160390566b0962b6a7fe532177d2d90fedadaaccc048dbacfc8d11",
                "md5": "22b28e5533426cbc1652c9ed2962ae5e",
                "sha256": "b51a639eef09b41ca5a130e5f4f911e8335cdd59c8288cb72ea6d67d30b20939"
            },
            "downloads": -1,
            "filename": "asyncfast-0.12.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "22b28e5533426cbc1652c9ed2962ae5e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 8150,
            "upload_time": "2025-08-31T20:54:36",
            "upload_time_iso_8601": "2025-08-31T20:54:36.594270Z",
            "url": "https://files.pythonhosted.org/packages/4c/21/d213ba160390566b0962b6a7fe532177d2d90fedadaaccc048dbacfc8d11/asyncfast-0.12.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0fd93b333bcd2ed15f6e41d84b1801d0f31941be4bd3d4f938601f43bc96bd3d",
                "md5": "0b4d1446d2599bc615232bb2f9e1fcac",
                "sha256": "17a5540e421a458faef1059ffcbf8c48c4643ceabf2e18512cc2b06ae5a86bfb"
            },
            "downloads": -1,
            "filename": "asyncfast-0.12.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0b4d1446d2599bc615232bb2f9e1fcac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6794,
            "upload_time": "2025-08-31T20:54:37",
            "upload_time_iso_8601": "2025-08-31T20:54:37.638970Z",
            "url": "https://files.pythonhosted.org/packages/0f/d9/3b333bcd2ed15f6e41d84b1801d0f31941be4bd3d4f938601f43bc96bd3d/asyncfast-0.12.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-31 20:54:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "asyncfast",
    "github_project": "amgi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "asyncfast"
}
        
Elapsed time: 1.94641s