Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Burr Serving Framework

Đang mở
#304 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
fastapi, python
Lĩnh vực
api, backend

Hướng nghiên cứu

Xem xét các ví dụ serving FastAPI được liên kết và pattern serving tùy chỉnh hiện tại trước khi thu hẹp phạm vi. So sánh các entry point được đề xuất là burr_fastapi.post và post_streaming, bao gồm các tùy chọn kiểm soát dừng và hành vi của response-model/state, đồng thời tính đến mối quan hệ với follow-up #139. Done nên có nghĩa là đã thống nhất một API ban đầu cùng với các acceptance test được ghi lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
2.6k
Fork
199
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/burr

Tất cả issue của apache/burr

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.