arbtrage-feather-sdk
Python SDK for Feather — enqueue tasks and run workers in-process (Celery-style) or as dedicated processes.
Install
pip install arbtrage-feather-sdk
Requires a running Feather server (FEATHER_ADDRESS, default localhost:50051).
Celery-style (embedded — recommended)
import asyncio
from feather import FeatherApp
app = FeatherApp()
async def send_email(ctx):
data = json.loads(ctx.payload.decode())
await mailer.send(data["to"])
app.task("send-email", send_email)
async def main():
await app.start_embedded()
app.delay("send-email", {"to": "user@example.com"})
await asyncio.sleep(3600) # keep app running
asyncio.run(main())
FastAPI integration
from contextlib import asynccontextmanager
from fastapi import FastAPI
from feather import FeatherApp
feather = FeatherApp()
@asynccontextmanager
async def lifespan(app: FastAPI):
await feather.start_embedded()
yield
await feather.shutdown()
app = FastAPI(lifespan=lifespan)
@app.post("/send")
async def send(to: str):
feather.delay("send-email", {"to": to})
return {"ok": True}
Publish
./scripts/bundle-protos.sh
cd packages/sdk-python && python -m build && twine upload dist/*
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arbtrage_feather_sdk-0.1.0.tar.gz.
File metadata
- Download URL: arbtrage_feather_sdk-0.1.0.tar.gz
- Upload date:
- Size: 86.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bdcd77f05ecbfd107b0c525b5d5315bdee138dcf4b473ad0d76d0de1642edc7
|
|
| MD5 |
cfbbbf8f771002cb35d657cf52cfc255
|
|
| BLAKE2b-256 |
5affaf36f842c9ee48850a48f1db7df92468cb680e7fb6efc2dd88cbcc6263a6
|
File details
Details for the file arbtrage_feather_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arbtrage_feather_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 95.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6410bdd5144f485bb5219c1e7c601ea2cea7c927ac6be578705140b41434355e
|
|
| MD5 |
9c23176ef433e8679cf4979333bcb430
|
|
| BLAKE2b-256 |
eeafd8707fd6677c4968abaf4f5897d48f01a1b8e161ddea20a7fa069c605c4c
|