Name | fastloop JSON |
Version |
0.1.58
JSON |
| download |
home_page | None |
Summary | A Python package for deploying stateful loops |
upload_time | 2025-07-29 16:35:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT |
keywords |
agentic
ai
baml
workflow
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# FastLoop
A Python package for building and deploying stateful loops. We use this at [beam.cloud](https://www.beam.cloud) to deploy agents.
## Installation
```bash
pip install fastloop
```
## Usage
### Basic Example
```python
from fastloop import FastLoop, LoopContext, LoopEvent
app = FastLoop(name="my-app")
@app.event("user_message")
class UserMessage(LoopEvent):
user_id: str
message: str
@app.loop(name="chat", start_event=UserMessage)
async def chat_loop(context: LoopContext):
user_msg = await context.wait_for(UserMessage, timeout=5.0)
print(f"User {user_msg.user_id} sent a message: {user_msg.message}")
# Your loop logic here
# If you want to stop the loop
context.stop()
# If you want to pause the loop
context.pause()
# By default, we just run it again
if __name__ == "__main__":
app.run(port=8000)
```
## Development
This project uses `uv` for dependency management.
```bash
# Install dependencies
uv sync
# Run tests
uv run pytest
# Build package
uv build
```
Raw data
{
"_id": null,
"home_page": null,
"name": "fastloop",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "agentic, ai, baml, workflow",
"author": null,
"author_email": "Luke Lombardi <luke@beaml.cloud>",
"download_url": "https://files.pythonhosted.org/packages/a5/dc/6f12b902a4a85ccfe3d1068575f1b553da634762cc20e926a272b752b5d7/fastloop-0.1.58.tar.gz",
"platform": null,
"description": "# FastLoop\n\nA Python package for building and deploying stateful loops. We use this at [beam.cloud](https://www.beam.cloud) to deploy agents.\n\n## Installation\n\n```bash\npip install fastloop\n```\n\n## Usage\n\n### Basic Example\n\n```python\nfrom fastloop import FastLoop, LoopContext, LoopEvent\n\napp = FastLoop(name=\"my-app\")\n\n@app.event(\"user_message\")\nclass UserMessage(LoopEvent):\n user_id: str\n message: str\n\n@app.loop(name=\"chat\", start_event=UserMessage)\nasync def chat_loop(context: LoopContext):\n user_msg = await context.wait_for(UserMessage, timeout=5.0)\n print(f\"User {user_msg.user_id} sent a message: {user_msg.message}\")\n \n # Your loop logic here\n\n # If you want to stop the loop\n context.stop()\n\n # If you want to pause the loop\n context.pause()\n\n # By default, we just run it again\n\nif __name__ == \"__main__\":\n app.run(port=8000)\n```\n\n## Development\n\nThis project uses `uv` for dependency management.\n\n```bash\n# Install dependencies\nuv sync\n\n# Run tests\nuv run pytest\n\n# Build package\nuv build\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for deploying stateful loops",
"version": "0.1.58",
"project_urls": {
"Homepage": "https://github.com/beam-cloud/fastloop",
"Issues": "https://github.com/beam-cloud/fastloop/issues",
"Repository": "https://github.com/beam-cloud/fastloop"
},
"split_keywords": [
"agentic",
" ai",
" baml",
" workflow"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9e2317356df596fa70932439ae07c3f925b8b74d0bbe919508001071c7743fa3",
"md5": "3d8e44fd9393154c72dda449a9a4e7ae",
"sha256": "1b01832bb8d4ef3c8cc609aac70e3f45f5fb17af1e3ecf763a19357be0cc4ec0"
},
"downloads": -1,
"filename": "fastloop-0.1.58-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3d8e44fd9393154c72dda449a9a4e7ae",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 33375,
"upload_time": "2025-07-29T16:35:01",
"upload_time_iso_8601": "2025-07-29T16:35:01.201876Z",
"url": "https://files.pythonhosted.org/packages/9e/23/17356df596fa70932439ae07c3f925b8b74d0bbe919508001071c7743fa3/fastloop-0.1.58-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a5dc6f12b902a4a85ccfe3d1068575f1b553da634762cc20e926a272b752b5d7",
"md5": "26dc03c492ed04b063829ceea278ee10",
"sha256": "a6eb3da8a5f7b11a43cd5c0fed23535d67d28219240c461dfdf55b6781abcdc7"
},
"downloads": -1,
"filename": "fastloop-0.1.58.tar.gz",
"has_sig": false,
"md5_digest": "26dc03c492ed04b063829ceea278ee10",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 95092,
"upload_time": "2025-07-29T16:35:02",
"upload_time_iso_8601": "2025-07-29T16:35:02.782865Z",
"url": "https://files.pythonhosted.org/packages/a5/dc/6f12b902a4a85ccfe3d1068575f1b553da634762cc20e926a272b752b5d7/fastloop-0.1.58.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-29 16:35:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "beam-cloud",
"github_project": "fastloop",
"github_not_found": true,
"lcname": "fastloop"
}