Skip to content

Improve SQLiteSession documentation with a runnable async example #1433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

MuhammadAbdullah95
Copy link

This update improves the SQLiteSession usage example in the documentation by making it a fully runnable script.
Changes include:

  • Wrapped async calls inside an async def main() function.
  • Used asyncio.run() for proper async execution.
  • Added if __name__ == "__main__": guard for clarity.
  • Added comments to guide users and make the snippet beginner-friendly.

This makes it easier for developers (especially those new to async in Python) to run and understand the example without additional setup.

@seratch seratch added the documentation Improvements or additions to documentation label Aug 12, 2025
@seratch
Copy link
Member

seratch commented Aug 12, 2025

Thanks for sending this. However, we'd like to avoid repeatedly having main function for all code snippets in the page.

@seratch seratch closed this Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants