infra: publish to pypi.org using namespace package #772

Closed
opened 2025-11-11 14:30:56 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @tcztzy on GitHub (May 1, 2024).

Is your feature request related to a problem? Please describe.
Publish this project to Pypi.org using namespace package.

Describe the solution you'd like
Once it is publish as a namespace like open_webui, then third party developer can publish their package like open_webui.apps.<my_app>

Describe alternatives you've considered
No

Additional context
No

Originally created by @tcztzy on GitHub (May 1, 2024). **Is your feature request related to a problem? Please describe.** Publish this project to Pypi.org using [namespace package](https://packaging.python.org/en/latest/guides/packaging-namespace-packages/). **Describe the solution you'd like** Once it is publish as a namespace like `open_webui`, then third party developer can publish their package like `open_webui.apps.<my_app>` **Describe alternatives you've considered** No **Additional context** No
GiteaMirror added the enhancementhelp wantedcore labels 2025-11-11 14:30:56 -06:00
Author
Owner

@tjbck commented on GitHub (May 4, 2024):

Github workflow PR welcome!

@tjbck commented on GitHub (May 4, 2024): Github workflow PR welcome!
Author
Owner

@tcztzy commented on GitHub (May 6, 2024):

I can contribute but It will rename the top level backend directory to open-webui, would you accept such a big change? And we also need a Pypi organization account.

@tcztzy commented on GitHub (May 6, 2024): I can contribute but It will rename the top level `backend` directory to `open-webui`, would you accept such a big change? And we also need a [Pypi organization account](https://docs.pypi.org/organization-accounts/).
Author
Owner

@tjbck commented on GitHub (May 6, 2024):

If we can rename the backend directory during our workflow that would be ideal.

@tjbck commented on GitHub (May 6, 2024): If we can rename the `backend` directory during our workflow that would be ideal.
Author
Owner

@tcztzy commented on GitHub (May 6, 2024):

it can be done without renaming the directory, but renaming the python imports is required in most cases. For example
30b053116d/backend/main.py (L20)
should be refactored as

from open_webui.apps.ollama.main import app as ollama_app 

and
30b053116d/backend/main.py (L38)
should be refactored as

from open_webui.utils.utils import get_admin_user

apps/utils/constants/config are very common module names and will conflict with other packages.

@tcztzy commented on GitHub (May 6, 2024): it can be done without renaming the directory, but renaming the python imports is required in most cases. For example https://github.com/open-webui/open-webui/blob/30b053116d6a40fc60dad1766e83ed41ffcb712c/backend/main.py#L20 should be refactored as ```python from open_webui.apps.ollama.main import app as ollama_app ``` and https://github.com/open-webui/open-webui/blob/30b053116d6a40fc60dad1766e83ed41ffcb712c/backend/main.py#L38 should be refactored as ```python from open_webui.utils.utils import get_admin_user ``` `apps`/`utils`/`constants`/`config` are very common module names and will conflict with other packages.
Author
Owner

@tcztzy commented on GitHub (May 13, 2024):

Maybe we should publish it firstly, use pipx will install package separated from other, therefore name conflict is not a big problem

@tcztzy commented on GitHub (May 13, 2024): Maybe we should publish it firstly, use `pipx` will install package separated from other, therefore name conflict is not a big problem
Author
Owner

@tjbck commented on GitHub (May 14, 2024):

I'll prioritise this in the near future!

@tjbck commented on GitHub (May 14, 2024): I'll prioritise this in the near future!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#772