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
{{ message }}
Repository navigation
Missing API reference for DatabaseSessionService #4331
I have a feeling that your docs generator fails to comprehend the deferred import (via __getattr__) but it's not my area of expertise, really, so it's just a guess.
Thanks for the issue! Agree that this looks related to lazy loading of modules.
We generate API docs from the Python library and then vendor them into [the adk-docs] repo to be served with the rest of the ADK docs.
Since this would need to be fixed in the upstream adk-python repo, I'll transfer this issue there, where they can investigate this see if there is a fix for the missing DatabaseSessionService info in their API docs config / generation process.
@olliefr — the __getattr__ lazy loading in sessions/__init__.py (lines 30-41) is why sphinx autodoc can't find DatabaseSessionService.
The class is in __all__ but not in the module's __dict__ after import, so docs generators skip it entirely.
The fix is to replace the __getattr__ with a try/except ImportError at module level: try: from .database_session_service import DatabaseSessionService / except ImportError: pass.
This keeps the optional sqlalchemy dependency handling while making the class visible to dir() and docs tools.
@wuliang229 thank you for picking this up. It would be great to have this fixed. I sometimes onboard teams to ADK and in my experience newcomers find the omission of DatabaseSessionService from the docs confusing. So I am really looking forward to seeing it fixed 🙂
Hi @wuliang229, If you haven't had a chance to start yet, I'd be happy to take this on and implement the fix suggested by @surajksharma07 (replacing the lazy __getattr__ with a top-level try/except block).
I've noticed how important this is for onboarding new users to ADK, so I'd love to help get it into the API reference. Let me know if I should open a PR!
This issue has been automatically marked as stale because it has not had recent activity for 7 days after a maintainer requested clarification. It will be closed if no further activity occurs within 7 days.
Hi @adk-bot and @wuliang229, this issue is still very much active. I have submitted PR #4608 which implements the faithful placeholder fix for DatabaseSessionService. I have already addressed all architectural feedback from the AI bot, including Mypy type hints and exception chaining. The PR is ready for a final human review!
Hello, @Akshat8510 and @wuliang229. I concur that this issue is very much an ongoing issue since the API documentation still does not include the information on on DatabaseSessionService and there is nothing positive about that.
Thank you, @Akshat8510 for having submitted the PR. I hope it gets reviewed and merged soon.
@adk-bot this is not a stale issue at all. We are waiting on a response from a maintainer since the issues raised in the review had been addressed.
Activity
koverholt commentedon Jan 30, 2026
Thanks for the issue! Agree that this looks related to lazy loading of modules.
We generate API docs from the Python library and then vendor them into [the adk-docs] repo to be served with the rest of the ADK docs.
Since this would need to be fixed in the upstream adk-python repo, I'll transfer this issue there, where they can investigate this see if there is a fix for the missing
DatabaseSessionServiceinfo in their API docs config / generation process.surajksharma07 commentedon Feb 9, 2026
@olliefr — the
__getattr__lazy loading insessions/__init__.py(lines 30-41) is why sphinx autodoc can't findDatabaseSessionService.The class is in
__all__but not in the module's__dict__after import, so docs generators skip it entirely.The fix is to replace the
__getattr__with atry/except ImportErrorat module level:try: from .database_session_service import DatabaseSessionService/except ImportError: pass.This keeps the optional sqlalchemy dependency handling while making the class visible to
dir()and docs tools.Team is looking more into it.
olliefr commentedon Feb 15, 2026
@wuliang229 thank you for picking this up. It would be great to have this fixed. I sometimes onboard teams to ADK and in my experience newcomers find the omission of
DatabaseSessionServicefrom the docs confusing. So I am really looking forward to seeing it fixed 🙂Akshat8510 commentedon Feb 24, 2026
Hi @wuliang229, If you haven't had a chance to start yet, I'd be happy to take this on and implement the fix suggested by @surajksharma07 (replacing the lazy
__getattr__with a top-leveltry/exceptblock).Akshat8510 commentedon Feb 24, 2026
I've noticed how important this is for onboarding new users to ADK, so I'd love to help get it into the API reference. Let me know if I should open a PR!
wuliang229 commentedon Feb 24, 2026
@Akshat8510 feel free to raise a PR
fix: make DatabaseSessionService visible to API documentation (google…
adk-bot commentedon Mar 4, 2026
This issue has been automatically marked as stale because it has not had recent activity for 7 days after a maintainer requested clarification. It will be closed if no further activity occurs within 7 days.
Akshat8510 commentedon Mar 4, 2026
Hi @adk-bot and @wuliang229, this issue is still very much active. I have submitted PR #4608 which implements the faithful placeholder fix for
DatabaseSessionService. I have already addressed all architectural feedback from the AI bot, including Mypy type hints and exception chaining. The PR is ready for a final human review!olliefr commentedon Mar 6, 2026
Hello, @Akshat8510 and @wuliang229. I concur that this issue is very much an ongoing issue since the API documentation still does not include the information on on
DatabaseSessionServiceand there is nothing positive about that.Thank you, @Akshat8510 for having submitted the PR. I hope it gets reviewed and merged soon.
@adk-bot this is not a stale issue at all. We are waiting on a response from a maintainer since the issues raised in the review had been addressed.
fix: make DatabaseSessionService visible in API docs
fix: make DatabaseSessionService visible in API docs