mirror of
https://github.com/open-webui/mcpo.git
synced 2026-11-05 01:27:39 +00:00
[PR #127] [CLOSED] feat: Add create_app function #180
Labels
No labels
bug
can't reproduce
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/mcpo#180
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/mcpo/pull/127
Author: @billben-net
Created: 5/10/2025
Status: ❌ Closed
Base:
dev← Head:binchick-in/add_create_app_function📝 Commits (2)
e37d0ebMerge pull request #108 from open-webui/devcc8cc67Add create_app function📊 Changes
1 file changed (+14 additions, -4 deletions)
View changed files
📝
src/mcpo/main.py(+14 -4)📄 Description
Changelog Entry
Description
This change refactors the FastAPI application construction logic out of the
runfunction inmcpo/main.pyinto a new public function,create_app. The newcreate_appfunction encapsulates all logic for building and configuring the main FastAPI app and any sub-apps, making the codebase more modular, testable, and reusable. Therunfunction now simply callscreate_appto obtain the app instance and passes it to Uvicorn for serving.Added
create_appfunctionMoved the code that creates the FastAPI instance to its own function so that it may be used elsewhere outside the context of MCPO.
Additional Information
I would like to utilize the proxy functionality in my own monolith application, being able to just return the FastAPI will allow me to mount it to my own FastAPI parent app.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.