Skip to content

Commit bc8431f

Browse files
committed
update docs
1 parent 3045219 commit bc8431f

File tree

7 files changed

+24
-3
lines changed

7 files changed

+24
-3
lines changed

examples/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Examples
2+
3+
This module contains examples of how to integrate and use the
4+
library in various frameworks and applications.

examples/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""
2+
This module contains examples of how to integrate and use the
3+
library in various frameworks and applications.
4+
"""

examples/fastapi_example/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# FastAPI example
2+
3+
An example of how to use the library with FastAPI
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""
2+
An example of how to use the library with FastAPI
3+
"""

examples/fastapi_example/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
The module where the database connection parameters are defined
2+
The module that defines the database connection parameters
33
"""
44

55
from sqlalchemy.ext.asyncio import (
@@ -14,7 +14,7 @@
1414

1515
def create_engine(host: str) -> AsyncEngine:
1616
"""
17-
database connection parameters.
17+
database connection parameters
1818
"""
1919

2020
# In production code, you will probably take these parameters from env
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Handlers example
2+
3+
A module that contains all the application handlers.
4+
5+
The examples are fictional, but they’re designed to demonstrate the
6+
various capabilities of the library.

examples/fastapi_example/routes/multiple_session_usage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ async def handler_multiple_sessions() -> None:
2626
_insert(), # context session
2727
run_in_new_ctx(_insert), # new context and session with autocommit
2828
run_in_new_ctx( # new context and session with manual commit
29-
_insert_manual, "example_multiple_sessions",
29+
_insert_manual,
30+
"example_multiple_sessions",
3031
),
3132
_insert_non_ctx(), # new non context session
3233
_insert_non_ctx_manual(), # new non context session

0 commit comments

Comments
 (0)