| 1 |
Improving the TODO app with SQLAlchemy |
| 2 |
-------------------------------------- |
| 3 |
|
| 4 |
.. admonition:: Who is this tutorial for? |
| 5 |
:class: info |
| 6 |
|
| 7 |
This tutorial is aimed at developers who are already familiar with Litestar's core concepts such as route |
| 8 |
handlers and dependency injection. |
| 9 |
|
| 10 |
If you are new to Litestar, it is recommended to first follow the |
| 11 |
`Developing a basic TODO application <../todo-app>`_ tutorial. |
| 12 |
|
| 13 |
Install SQLAlchemy |
| 14 |
================== |
| 15 |
|
| 16 |
To follow this tutorial, you will need SQLAlchemy installed. You can install it with ``pip install 'sqlalchemy[aiosqlite]'``, or let |
| 17 |
Litestar install it for you by installing the ``sqlalchemy`` extra (e.g., ``pip install 'litestar[standard,sqlalchemy]' aiosqlite``). |
| 18 |
|
| 19 |
What's in this tutorial? |
| 20 |
======================== |
| 21 |
|
| 22 |
This tutorial builds on the `TODO app tutorial <../todo-app>`_ by adding a database backend using |
| 23 |
`SQLAlchemy <https://www.sqlalchemy.org/>`_. |
| 24 |
|
| 25 |
We start by comparing a refactored TODO app that leverages SQLAlchemy for data persistence to the TODO app from the |
| 26 |
`TODO app tutorial <../todo-app>`_. |
| 27 |
|
| 28 |
We will then gradually improve on the design of our app by utilising more of Litestar's features, such as dependency |
| 29 |
injection, and plugins. |
| 30 |
|
| 31 |
Contents |
| 32 |
======== |
| 33 |
|
| 34 |
.. toctree:: |
| 35 |
:titlesonly: |
| 36 |
|
| 37 |
0-introduction |
| 38 |
1-provide-session-with-di |
| 39 |
2-serialization-plugin |
| 40 |
3-init-plugin |
| 41 |
4-final-touches-and-recap |