arbitrage-feather
Python SDK for Feather — enqueue tasks and run workers in-process (Celery-style) or as dedicated processes.
Install
pip install arbitrage-feather
Requires a running Feather server (FEATHER_ADDRESS, default localhost:50051).
Celery-style (embedded — recommended)
import asyncio
from arbitrage.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 arbitrage.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
arbitrage_feather-0.1.2.tar.gz
(86.5 kB
view details)
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 arbitrage_feather-0.1.2.tar.gz.
File metadata
- Download URL: arbitrage_feather-0.1.2.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 |
89c5cc0877e8b542eb94b28409cfd93599cebe0e7d6fab32806a053e6ada8554
|
|
| MD5 |
4df2115b7c71b0262b9e0149b82f4d45
|
|
| BLAKE2b-256 |
bc31727475067abe0ad337acd2162a2b4d4f9ef42174c8d048555925772fa101
|
File details
Details for the file arbitrage_feather-0.1.2-py3-none-any.whl.
File metadata
- Download URL: arbitrage_feather-0.1.2-py3-none-any.whl
- Upload date:
- Size: 96.4 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 |
0c7abf5724226e44ea91ffa1b5d4bb958a1843c2d24f2bd0c2b48955f56be1f2
|
|
| MD5 |
af85a768e7b5abf288d74663d9dd8e42
|
|
| BLAKE2b-256 |
0fa5d30831e4925f5ed605b2650c87c01b1ac8ab36fb5268b7220614bbaa1503
|