You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe why it is important and where it will be useful
The fastapi dependency is only necessary when implementing an "app", i.e. using NextCloudApp or AsyncNextCloudApp. If one is only interested in using the nextcloud API, i.e. NextCloud and AsyncNextCloud, the fastapi dependency is simply "dead weight" (in my specific case, it generated a version conflict because I need to use an older version of fastapi for some reason).
Describe your proposed solution
Is it possible to make fastapi an optional dependency for the app option? This would, however, probably entail moving the NextCloudApp and AsyncNextCloudApp into the ex_app package (which is a breaking change...?).
It would probably also mean that the whole ex_app package could be imported "optionally" (guarded with a try...except block similarly to the uvicorn import in the ex_app.uvicorn_fastapi module).
Describe alternatives you've considered, if relevant
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
This should be implemented in nc_py_api version 1.0.0 which will be full rework of current version with breaking changes.
Idea is to:
Remove all sync call to not duplicate code, and provide only async variants of functions.
Split library in two parts: nc_py_api that will support all basic Nextcloud functionality and nc_py_app_api that will depend on nc_py_api and provide only functionality related to AppAPI.
Raise minimum version of Python to 3.12 to use all last features.
This will allow to use nc_py_api some openapi specs that Nextcloud already provides.
Current generators for Python are very bad, but we can leverage the use of AI for that, it will work nice.
Also, all code should be written in a correct way so it should be easily supported by latest LLMs like Gemini 2.5 Pro+ and o3+.
Anyone interested in this? I can make initial work, but we need contributors who will work on this after and will be interested in this project(s).
bigcat88
changed the title
Make fastapi dependency optional
Make fastapi dependency optional [QUESTION FOR ALL]
Apr 28, 2025
Describe why it is important and where it will be useful
The
fastapi
dependency is only necessary when implementing an "app", i.e. usingNextCloudApp
orAsyncNextCloudApp
. If one is only interested in using the nextcloud API, i.e.NextCloud
andAsyncNextCloud
, thefastapi
dependency is simply "dead weight" (in my specific case, it generated a version conflict because I need to use an older version offastapi
for some reason).Describe your proposed solution
Is it possible to make
fastapi
an optional dependency for theapp
option? This would, however, probably entail moving theNextCloudApp
andAsyncNextCloudApp
into theex_app
package (which is a breaking change...?).It would probably also mean that the whole
ex_app
package could be imported "optionally" (guarded with atry...except
block similarly to theuvicorn
import in theex_app.uvicorn_fastapi
module).Describe alternatives you've considered, if relevant
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: