Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Burr Serving Framework

Aperta
#304 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
fastapi, python
Ambito
api, backend

Direzione di ricerca

Esamina gli esempi di serving FastAPI collegati e l’attuale pattern di serving personalizzato prima di restringere l’ambito. Confronta gli entry point proposti burr_fastapi.post e post_streaming, inclusi i controlli di arresto e il comportamento di response-model/state, e considera la relazione con il follow-up #139. Done dovrebbe significare che è stata concordata una prima API con test di accettazione documentati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/core kind/feature priority/low

Is your feature request related to a problem? Please describe.
We have some examples of serving in FastAPI. They all follow the same pattern. We should be able to automate this (to some extent):

Describe the solution you'd like
A few thoughts:

In FastAPI:

burr_app = Application()....build()
app = FastAPI()
burr_fastapi.post("/api/v0/...", app, burr_app, halt_after=..., halt_before=..., ..., response_model=CustomResponseModel)
burr_fastapi.post_streaming("/api/v0/...", app, burr_app, halt_after=..., halt_before=..., ..., response_model=CustomResponseModel)

Then CustomResponseModel has to be instantiatable from state dict (E.G. be a subset/have the right defaults).

Could also decorate functions -- these inject the results in

burr_app = Application()....build()
app = FastAPI()
@burr_fastapi.post("/api/v0/...", app, burr_app, halt_after=..., halt_before=..., ...)
def my_burr_endpoint(burr_state, burr_action, burr_result) -> MyResponse:
    return MyResponse(...)

Note that we could also derive it if we set up the fields we expose in state + add #139 -- this is something we'd want to do later, but...

burr_app = ...
app = FastAPI()
burr_fastapi.post("/api/v0/...", app, burr_app, halt_after=..., halt_before=..., ...)

This could automatically derive the response model based on types statically inferred + halt_before/halt_after, although it's a little complicated...

Describe alternatives you've considered
Can do custom like we do now.

Additional context
As asked on discord -- this is part 1

Lingua principale
Python
Stelle
2.6k
Fork
209
Merge medio
8g 9h
PR unite (30g)
26

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/burr

Tutte le issue di apache/burr

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.