sysid / sse-starlette

BSD 3-Clause "New" or "Revised" License
544 stars 37 forks source link

Python type hints #86

Closed lukecivantos closed 10 months ago

lukecivantos commented 10 months ago

Hey there!

I was wondering if there were any plans to add types or type stubs to this library.

Thanks!

sysid commented 10 months ago

@lukecivantos , not sure what you mean. Sse-starlette is typed. Can you please elaborate.

ahmedabdou14 commented 10 months ago

I was going to raise the same request here actually. It is going to be super helpful to maybe make EventSourceResponse accept a generic type that specifies the type of content stream sent. I am not sure if this would be of any help to openapi docs, but it would be nice to see the data type sent via sse within redoc and openapi.

sysid commented 10 months ago

@ahmedabdou14 thanks for adding to the topic. I am very open for these ideas. PRs are welcome!

ahmedabdou14 commented 10 months ago

Perfect then ;) A PR might come very late though, i am super busy this month You can go ahead and assign me to this issue

sysid commented 10 months ago

@ahmedabdou14 , closing this for now, but PR is welcome any time. Hope this is ok.