Comments (5)
@Kludex is the idea to use this kind of implementation https://gist.github.com/tomchristie/3293d5b118b5646ce79cc074976744b0 for the WebSocket tests
from uvicorn.
Yes. Some tweak is needed to use app=app
.
from uvicorn.
@Kludex app is passed to the config like this
config = Config(
app=app,
ws=ws_protocol_cls,
http=http_protocol_cls,
lifespan="off",
port=unused_tcp_port,
)
Which is then passed to run_server async with run_server(config):
No sure why you need app=app
for this
from uvicorn.
I have opened a PR for this issue
from uvicorn.
Related Issues (20)
- Protocol upgrade request not supported; websocket and install issue HOT 1
- TypeError: __call__() missing 1 required positional argument: 'start_response' HOT 1
- Ctrl+C in terminal broken on windows HOT 19
- `ProxyHeadersMiddleware` not using the `X-Forwarded-Port` header HOT 1
- 0.22.0: pytest is failing in `tests/protocols/test_websocket.py::test_asgi_return_value[H11Protocol-WebSocketProtocol]` unit HOT 4
- Create own types instead of using `asgiref`
- Memory leak using uvicorn with FastAPI and Django HOT 3
- Slow reload on Windows 10 using PyCharm HOT 14
- ERROR throwed when it's working with frp HOT 1
- Improve GitHub templates (issues, PRs and discussions)
- asyncio.exceptions.CancelledError not being handled properly inside Docker image
- How to run fastapi with uvicorn in digitalocean app platform
- Uvicorn fails "quietly" upon a circular import error HOT 4
- Uvicorn workers
- Duplicate `WebSocketException` class in starlette and websockets HOT 2
- After making a few POST requests with large body and small keep-alive, one of the requests ends with the connection aborted. HOT 2
- Unexpected Shutdown on gunicorn or uvicorn server
- Add page about encode and sponsors to the documentation HOT 3
- reload doesn't work from programmatic launch (asyncio)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uvicorn.