Skip to content

Commit 52fe9cc

Browse files
committed
Added notes to clarify why FastAPI was used for this example
1 parent bc8c01e commit 52fe9cc

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

sqlite-cloud/quick-start-fastapi-sqlalchemy.mdx renamed to sqlite-cloud/quick-start-sqlalchemy-orm.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ status: publish
66
slug: quick-start-sqlalchemy-orm
77
---
88

9-
In this quickstart, we will show you how to get started with SQLite Cloud by building a FastAPI backend that connects to and reads from a SQLite Cloud database using SQLAlchemy.
9+
In this Quick Start, we will show you how to get started with SQLite Cloud by building a FastAPI backend that connects to and reads from a SQLite Cloud database using SQLAlchemy.
10+
11+
NOTE that FastAPI framework:
12+
- does NOT require you to use a relational database or any database at all.
13+
- CAN work with any ORM library (including SQLAlchemy) or database (including SQLite, which comes pre-installed in Python and is a database supported by SQLAlchemy).
14+
- code is MINIMAL in the example below. Most of the code is standard SQLAlchemy and framework-agnostic.
1015

1116
---
1217

@@ -21,8 +26,8 @@ In this quickstart, we will show you how to get started with SQLite Cloud by bui
2126
mkdir sqlalchemy-quickstart
2227
cd sqlalchemy-quickstart
2328

24-
# open the project in VSCode
25-
# code .
29+
# open the project in VSCode / another editor
30+
code .
2631

2732
python3 -m venv .venv
2833
. .venv/bin/activate
@@ -155,7 +160,8 @@ AttributeError: module 'sqlitecloud.dbapi2' has no attribute 'sqlite_version_inf
155160

156161
7. **References**
157162

158-
- If you're new to FastAPI and/or want to learn more about how to work with ORMs in FastAPI, we referenced FastAPI's [introductory example](https://fastapi.tiangolo.com/#example) and [SQL Databases tutorial](https://fastapi.tiangolo.com/tutorial/sql-databases/) extensively when writing this Quickstart.
159-
- If you're new to SQLAlchemy, refer to [their latest docs](https://docs.sqlalchemy.org/en/20/).
163+
- [FastAPI introductory example](https://fastapi.tiangolo.com/#example)
164+
- [FastAPI SQL Databases tutorial](https://fastapi.tiangolo.com/tutorial/sql-databases/)
165+
- [Latest SQLAlchemy docs](https://docs.sqlalchemy.org/en/20/)
160166

161167
And that's it! You've successfully built a FastAPI app that uses SQLAlchemy ORM to read data from a SQLite Cloud database.

0 commit comments

Comments
 (0)