Replies: 1 comment 1 reply
-
I'm not really sure what you're trying to do here but here's a pattern that should work: What I imagine your original is like
What I suggest:
This decouples your logic a bit and allows calling |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
/
Description
Hello,
I would like to be able to import the fastapi app in one of my application and to call endpoints of routers without passing by the HTTP endpoints & overloading the infrastructure.
Today I'm using testclient for this in production but this seems not the best solution as I'm quickly reaching memory & cpu problems.
Any idea what I could do here to "mock" rest calls ?
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.95.2
Pydantic Version
1.10.2
Python Version
3.11.8
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions