diff --git a/README.md b/README.md index 712167ffd6..93e9e4461f 100644 --- a/README.md +++ b/README.md @@ -6,30 +6,30 @@ SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
--- -**Documentation**: https://sqlmodel.tiangolo.com +**Documentation**: [https://sqlmodel.tiangolo.com](https://sqlmodel.tiangolo.com) -**Source Code**: https://github.com/fastapi/sqlmodel +**Source Code**: [https://github.com/fastapi/sqlmodel](https://github.com/fastapi/sqlmodel) --- SQLModel is a library for interacting with SQL databases from Python code, with Python objects. It is designed to be intuitive, easy to use, highly compatible, and robust. -**SQLModel** is based on Python type annotations, and powered by Pydantic and SQLAlchemy. +**SQLModel** is based on Python type annotations, and powered by [Pydantic](https://pydantic-docs.helpmanual.io/) and [SQLAlchemy](https://sqlalchemy.org/). The key features are: @@ -49,9 +49,9 @@ The key features are: ## SQL Databases in FastAPI -
+
-**SQLModel** is designed to simplify interacting with SQL databases in FastAPI applications, it was created by the same author. π
+**SQLModel** is designed to simplify interacting with SQL databases in [FastAPI](https://fastapi.tiangolo.com) applications, it was created by the same [author](https://tiangolo.com/). π
It combines SQLAlchemy and Pydantic and tries to simplify the code you write as much as possible, allowing you to reduce the **code duplication to a minimum**, but while getting the **best developer experience** possible.
@@ -59,13 +59,13 @@ It combines SQLAlchemy and Pydantic and tries to simplify the code you write as
## Requirements
-A recent and currently supported version of Python.
+A recent and currently supported [version of Python](https://www.python.org/downloads/).
As **SQLModel** is based on **Pydantic** and **SQLAlchemy**, it requires them. They will be automatically installed when you install SQLModel.
## Installation
-Make sure you create a virtual environment, activate it, and then install SQLModel, for example with:
+Make sure you create a [virtual environment](https://sqlmodel.tiangolo.com/virtual-environments/), activate it, and then install SQLModel, for example with:
+
It follows the same design and ideas, and it was created to be the most intuitive way to interact with SQL databases in FastAPI applications.
@@ -14,9 +14,9 @@ Nevertheless, SQLModel is completely **independent** of FastAPI and can be used
It's all based on standard modern **Python** type annotations. No new syntax to learn. Just standard modern Python.
-If you need a 2 minute refresher of how to use Python types (even if you don't use SQLModel or FastAPI), check the FastAPI tutorial section: Python types intro.
+If you need a 2 minute refresher of how to use Python types (even if you don't use SQLModel or FastAPI), check the FastAPI tutorial section: [Python types intro](https://fastapi.tiangolo.com/python-types/).
-You will also see a 20 seconds refresher on the section [Tutorial - User Guide: First Steps](tutorial/index.md){.internal-link target=_blank}.
+You will also see a 20 seconds refresher on the section [Tutorial - User Guide: First Steps](tutorial/index.md).
## Editor support
@@ -24,11 +24,11 @@ You will also see a 20 seconds refresher on the section [Tutorial - User Guide:
Here's how your editor might help you:
-* in Visual Studio Code:
+* in [Visual Studio Code](https://code.visualstudio.com/):
-* in PyCharm:
+* in [PyCharm](https://www.jetbrains.com/pycharm/):
@@ -36,7 +36,7 @@ You will get completion for everything while writing the **minimum** amount of c
You won't need to keep guessing the types of different attributes in your models, if they could be `None`, etc. Your editor will be able to help you with everything because **SQLModel** is based on **standard Python type annotations**.
-**SQLModel** adopts PEP 681 for Python type annotations to ensure the **best developer experience**, so you will get inline errors and autocompletion even while creating new model instances.
+**SQLModel** adopts [PEP 681](https://peps.python.org/pep-0681/) for Python type annotations to ensure the **best developer experience**, so you will get inline errors and autocompletion even while creating new model instances.
@@ -76,7 +76,7 @@ Underneath, β¨ a **SQLModel** model is also a **SQLAlchemy** model. β¨
There was **a lot** of research and effort dedicated to make it that way. In particular, there was a lot of effort and experimentation in making a single model be **both a SQLAlchemy model and a Pydantic** model at the same time.
-That means that you get all the power, robustness, and certainty of SQLAlchemy, the most widely used database library in Python.
+That means that you get all the power, robustness, and certainty of SQLAlchemy, the [most widely used database library in Python](https://lp.jetbrains.com/python-developers-survey-2024/#orms).
**SQLModel** provides its own utilities to improve the developer experience, but underneath, it uses all of SQLAlchemy.
diff --git a/docs/help.md b/docs/help.md
index 6e5fe581f7..7e52e87009 100644
--- a/docs/help.md
+++ b/docs/help.md
@@ -12,7 +12,7 @@ And there are several ways to get help too.
## Subscribe to the FastAPI and Friends newsletter
-You can subscribe to the (infrequent) **FastAPI and friends** newsletter to stay updated about:
+You can subscribe to the (infrequent) [**FastAPI and friends** newsletter](https://fastapi.tiangolo.com/newsletter) to stay updated about:
* News about FastAPI and friends, including SQLModel π
* Guides π
@@ -22,13 +22,13 @@ You can subscribe to the (infrequent) https://github.com/fastapi/sqlmodel. βοΈ
+You can "star" SQLModel in GitHub (clicking the star button at the top right): [https://github.com/fastapi/sqlmodel](https://github.com/fastapi/sqlmodel). βοΈ
By adding a star, other users will be able to find it more easily and see that it has been already useful for others.
## Watch the GitHub repository for releases
-You can "watch" SQLModel in GitHub (clicking the "watch" button at the top right): https://github.com/fastapi/sqlmodel. π
+You can "watch" SQLModel in GitHub (clicking the "watch" button at the top right): [https://github.com/fastapi/sqlmodel](https://github.com/fastapi/sqlmodel). π
There you can select "Releases only".
@@ -36,25 +36,25 @@ By doing it, you will receive notifications (in your email) whenever there's a n
## Connect with the author
-You can connect with me (SebastiΓ‘n RamΓrez / `tiangolo`), the author.
+You can connect with [me (SebastiΓ‘n RamΓrez / `tiangolo`)](https://tiangolo.com), the author.
You can:
-* Follow me on **GitHub**.
+* [Follow me on **GitHub**](https://github.com/tiangolo).
* See other Open Source projects I have created that could help you.
* Follow me to see when I create a new Open Source project.
-* Follow me on **Twitter**.
+* [Follow me on **Twitter**](https://twitter.com/tiangolo).
* Tell me how you use SQLModel (I love to hear that).
* Hear when I make announcements or release new tools.
-* Connect with me on **Linkedin**.
+* [Connect with me on **Linkedin**](https://www.linkedin.com/in/tiangolo/).
* Hear when I make announcements or release new tools (although I use Twitter more often π€·ββ).
-* Read what I write (or follow me) on **Dev.to** or **Medium**.
+* Read what I write (or follow me) on [**Dev.to**](https://dev.to/tiangolo) or [**Medium**](https://medium.com/@tiangolo).
* Read other ideas, articles, and read about tools I have created.
* Follow me to read when I publish something new.
## Tweet about **SQLModel**
-Tweet about **SQLModel** and let me and others know why you like it. π
+[Tweet about **SQLModel**](https://twitter.com/compose/tweet?text=I'm loving SQLModel because... https://github.com/fastapi/sqlmodel cc: @tiangolo) and let me and others know why you like it. π
I love to hear about how **SQLModel** is being used, what you have liked in it, in which project/company are you using it, etc.
@@ -62,8 +62,8 @@ I love to hear about how **SQLModel** is being used, what you have liked in it,
You can try and help others with their questions in:
-* GitHub Discussions
-* GitHub Issues
+* [GitHub Discussions](https://github.com/fastapi/sqlmodel/discussions/categories/questions?discussions_q=category%3AQuestions+is%3Aunanswered)
+* [GitHub Issues](https://github.com/fastapi/sqlmodel/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Aquestion+-label%3Aanswered+)
In many cases you might already know the answer for those questions. π€
@@ -91,7 +91,7 @@ For most of the cases and most of the questions there's something related to the
In many cases they will only copy a fragment of the code, but that's not enough to **reproduce the problem**.
-* You can ask them to provide a minimal, reproducible, example, that you can **copy-paste** and run locally to see the same error or behavior they are seeing, or to understand their use case better.
+* You can ask them to provide a [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example), that you can **copy-paste** and run locally to see the same error or behavior they are seeing, or to understand their use case better.
* If you are feeling too generous, you can try to **create an example** like that yourself, just based on the description of the problem. Just have in mind that this might take a lot of time and it might be better to ask them to clarify the problem first.
@@ -112,7 +112,7 @@ If they reply, there's a high chance you would have solved their problem, congra
## Watch the GitHub repository
-You can "watch" SQLModel in GitHub (clicking the "watch" button at the top right): https://github.com/fastapi/sqlmodel. π
+You can "watch" SQLModel in GitHub (clicking the "watch" button at the top right): [https://github.com/fastapi/sqlmodel](https://github.com/fastapi/sqlmodel). π
If you select "Watching" instead of "Releases only" you will receive notifications when someone creates a new issue or question. You can also specify that you only want to be notified about new issues, or discussions, or PRs, etc.
@@ -120,7 +120,7 @@ Then you can try and help them solve those questions.
## Ask Questions
-You can create a new question in the GitHub repository, for example to:
+You can [create a new question](https://github.com/fastapi/sqlmodel/discussions/new?category=questions) in the GitHub repository, for example to:
* Ask a **question** or ask about a **problem**.
* Suggest a new **feature**.
@@ -183,7 +183,7 @@ So, it's really important that you actually read and run the code, and let me kn
## Create a Pull Request
-You can [contribute](contributing.md){.internal-link target=_blank} to the source code with Pull Requests, for example:
+You can [contribute](contributing.md) to the source code with Pull Requests, for example:
* To fix a typo you found on the documentation.
* To propose new documentation sections.
@@ -201,8 +201,8 @@ There's a lot of work to do, and for most of it, **YOU** can do it.
The main tasks that you can do right now are:
-* [Help others with questions in GitHub](#help-others-with-questions-in-github){.internal-link target=_blank} (see the section above).
-* [Review Pull Requests](#review-pull-requests){.internal-link target=_blank} (see the section above).
+* [Help others with questions in GitHub](#help-others-with-questions-in-github) (see the section above).
+* [Review Pull Requests](#review-pull-requests) (see the section above).
Those two tasks are what **consume time the most**. That's the main work of maintaining SQLModel.
@@ -210,11 +210,11 @@ If you can help me with that, **you are helping me maintain SQLModel** and makin
## Join the chat
-Join the π₯ FastAPI and Friends Discord chat server π₯ and hang out with others in the community. There's a `#sqlmodel` channel.
+Join the π₯ [FastAPI and Friends Discord chat server](https://discord.gg/VQjSZaeJmf) π₯ and hang out with others in the community. There's a `#sqlmodel` channel.
/// tip
-For questions, ask them in GitHub Discussions, there's a much better chance you will receive help there.
+For questions, ask them in [GitHub Discussions](https://github.com/fastapi/sqlmodel/discussions/new?category=questions), there's a much better chance you will receive help there.
Use the chat only for other general conversations.
@@ -232,7 +232,7 @@ On the other side, there are thousands of users in the chat, so there's a high c
## Sponsor the author
-You can also financially support the author (me) through GitHub sponsors.
+You can also financially support the author (me) through [GitHub sponsors](https://github.com/sponsors/tiangolo).
There you could buy me a coffee βοΈ to say thanks. π
@@ -242,8 +242,8 @@ As you have seen in the documentation, SQLModel stands on the shoulders of giant
You can also sponsor:
-* Samuel Colvin (Pydantic)
-* SQLAlchemy
+* [Samuel Colvin (Pydantic)](https://github.com/sponsors/samuelcolvin)
+* [SQLAlchemy](https://github.com/sponsors/sqlalchemy)
---
diff --git a/docs/index.md b/docs/index.md
index cd48b91385..2bc3d1998c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -12,30 +12,30 @@
SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
---
-**Documentation**: https://sqlmodel.tiangolo.com
+**Documentation**: [https://sqlmodel.tiangolo.com](https://sqlmodel.tiangolo.com)
-**Source Code**: https://github.com/fastapi/sqlmodel
+**Source Code**: [https://github.com/fastapi/sqlmodel](https://github.com/fastapi/sqlmodel)
---
SQLModel is a library for interacting with SQL databases from Python code, with Python objects. It is designed to be intuitive, easy to use, highly compatible, and robust.
-**SQLModel** is based on Python type annotations, and powered by Pydantic and SQLAlchemy.
+**SQLModel** is based on Python type annotations, and powered by [Pydantic](https://pydantic-docs.helpmanual.io/) and [SQLAlchemy](https://sqlalchemy.org/).
The key features are:
@@ -51,10 +51,10 @@ The key features are:
{% if sponsors %}
{% for sponsor in sponsors.gold -%}
-
+
-**SQLModel** is designed to simplify interacting with SQL databases in FastAPI applications, it was created by the same author. π
+**SQLModel** is designed to simplify interacting with SQL databases in [FastAPI](https://fastapi.tiangolo.com) applications, it was created by the same [author](https://tiangolo.com/). π
It combines SQLAlchemy and Pydantic and tries to simplify the code you write as much as possible, allowing you to reduce the **code duplication to a minimum**, but while getting the **best developer experience** possible.
@@ -72,13 +72,13 @@ It combines SQLAlchemy and Pydantic and tries to simplify the code you write as
## Requirements
-A recent and currently supported version of Python.
+A recent and currently supported [version of Python](https://www.python.org/downloads/).
As **SQLModel** is based on **Pydantic** and **SQLAlchemy**, it requires them. They will be automatically installed when you install SQLModel.
## Installation
-Make sure you create a virtual environment, activate it, and then install SQLModel, for example with:
+Make sure you create a [virtual environment](https://sqlmodel.tiangolo.com/virtual-environments/), activate it, and then install SQLModel, for example with:
-Go ahead and Install DB Browser for SQLite, it's free.
+Go ahead and [Install DB Browser for SQLite](https://sqlitebrowser.org/), it's free.
## Next Steps
diff --git a/docs/management-tasks.md b/docs/management-tasks.md
index a1eb0b1863..bb2e84a101 100644
--- a/docs/management-tasks.md
+++ b/docs/management-tasks.md
@@ -1,6 +1,6 @@
# Repository Management Tasks
-These are the tasks that can be performed to manage the SQLModel repository by [team members](./management.md#team){.internal-link target=_blank}.
+These are the tasks that can be performed to manage the SQLModel repository by [team members](./management.md#team).
/// tip
@@ -8,9 +8,9 @@ This section is useful only to a handful of people, team members with permission
///
-...so, you are a [team member of SQLModel](./management.md#team){.internal-link target=_blank}? Wow, you are so cool! π
+...so, you are a [team member of SQLModel](./management.md#team)? Wow, you are so cool! π
-You can help with everything on [Help SQLModel - Get Help](./help.md){.internal-link target=_blank} the same ways as external contributors. But additionally, there are some tasks that only you (as part of the team) can perform.
+You can help with everything on [Help SQLModel - Get Help](./help.md) the same ways as external contributors. But additionally, there are some tasks that only you (as part of the team) can perform.
Here are the general instructions for the tasks you can perform.
@@ -40,22 +40,22 @@ For conversations that are more difficult, for example to reject a PR, you can a
## Edit PR Titles
-* Edit the PR title to start with an emoji from gitmoji.
+* Edit the PR title to start with an emoji from [gitmoji](https://gitmoji.dev/).
* Use the emoji character, not the GitHub code. So, use `π` instead of `:bug:`. This is so that it shows up correctly outside of GitHub, for example in the release notes.
* Start the title with a verb. For example `Add`, `Refactor`, `Fix`, etc. This way the title will say the action that the PR does. Like `Add support for teleporting`, instead of `Teleporting wasn't working, so this PR fixes it`.
* Edit the text of the PR title to start in "imperative", like giving an order. So, instead of `Adding support for teleporting` use `Add support for teleporting`.
* Try to make the title descriptive about what it achieves. If it's a feature, try to describe it, for example `Add support for teleporting` instead of `Create TeleportAdapter class`.
* Do not finish the title with a period (`.`).
-Once the PR is merged, a GitHub Action (latest-changes) will use the PR title to update the latest changes automatically.
+Once the PR is merged, a GitHub Action ([latest-changes](https://github.com/tiangolo/latest-changes)) will use the PR title to update the latest changes automatically.
So, having a nice PR title will not only look nice in GitHub, but also in the release notes. π
## Add Labels to PRs
-The same GitHub Action latest-changes uses one label in the PR to decide the section in the release notes to put this PR in.
+The same GitHub Action [latest-changes](https://github.com/tiangolo/latest-changes) uses one label in the PR to decide the section in the release notes to put this PR in.
-Make sure you use a supported label from the latest-changes list of labels:
+Make sure you use a supported label from the [latest-changes list of labels](https://github.com/tiangolo/latest-changes#using-labels):
* `breaking`: Breaking Changes
* Existing code will break if they update the version without changing their code. This rarely happens, so this label is not frequently used.
@@ -114,4 +114,4 @@ Dependabot will create PRs to update dependencies for several things, and those
When a question in GitHub Discussions has been answered, mark the answer by clicking "Mark as answer".
-You can filter discussions by `Questions` that are `Unanswered`.
+You can filter discussions by [`Questions` that are `Unanswered`](https://github.com/fastapi/sqlmodel/discussions/categories/questions?discussions_q=category:Questions+is:open+is:unanswered).
diff --git a/docs/management.md b/docs/management.md
index 0078e364c3..768768d062 100644
--- a/docs/management.md
+++ b/docs/management.md
@@ -4,15 +4,15 @@ Here's a short description of how the SQLModel repository is managed and maintai
## Owner
-I, @tiangolo, am the creator and owner of the SQLModel repository. π€
+I, [@tiangolo](https://github.com/tiangolo), am the creator and owner of the SQLModel repository. π€
-I normally give the final review to each PR before merging them. I make the final decisions on the project, I'm the BDFL. π
+I normally give the final review to each PR before merging them. I make the final decisions on the project, I'm the [BDFL](https://en.wikipedia.org/wiki/Benevolent_dictator_for_life). π
## Team
There's a team of people that help manage and maintain the project. π
-They have different levels of permissions and [specific instructions](./management-tasks.md){.internal-link target=_blank}.
+They have different levels of permissions and [specific instructions](./management-tasks.md).
Some of the tasks they can perform include:
@@ -31,7 +31,7 @@ This is the current list of team members. π
-A dialog should show up. Go to the [project directory you created](../virtual-environments.md#create-a-project){.internal-link target=_blank} and save the file with a name of `database.db`.
+A dialog should show up. Go to the [project directory you created](../virtual-environments.md#create-a-project) and save the file with a name of `database.db`.
/// tip
@@ -159,9 +159,9 @@ And if you go back to the Database Structure tab, you will see that y
I will keep showing you small bits of SQL through this tutorial. And you don't have to be a SQL expert to use **SQLModel**.
-But if you are curious and want to get a quick overview of SQL, I recommend the visual documentation from SQLite, on SQL As Understood By SQLite.
+But if you are curious and want to get a quick overview of SQL, I recommend the visual documentation from SQLite, on [SQL As Understood By SQLite](https://www.sqlite.org/lang.html).
-You can start with `CREATE TABLE`.
+You can start with [`CREATE TABLE`](https://www.sqlite.org/lang_createtable.html).
Of course, you can also go and take a full SQL course or read a book about SQL, but you don't need more than what I'll explain here on the tutorial to start being productive with **SQLModel**. π€
diff --git a/docs/tutorial/create-db-and-table.md b/docs/tutorial/create-db-and-table.md
index bbd5532bae..2163956767 100644
--- a/docs/tutorial/create-db-and-table.md
+++ b/docs/tutorial/create-db-and-table.md
@@ -2,7 +2,7 @@
Now let's get to the code. π©βπ»
-Make sure you are inside of your project directory and with your virtual environment activated as explained in [Virtual Environments](../virtual-environments.md#create-a-project){.internal-link target=_blank}.
+Make sure you are inside of your project directory and with your virtual environment activated as explained in [Virtual Environments](../virtual-environments.md#create-a-project).
We will:
@@ -176,7 +176,7 @@ SQLite supports a special database that lives all *in memory*. Hence, it's very
{* ./docs_src/tutorial/create_db_and_table/tutorial001_py310.py ln[1:16] hl[11:12,14] *}
-You can read a lot more about all the databases supported by **SQLAlchemy** (and that way supported by **SQLModel**) in the SQLAlchemy documentation.
+You can read a lot more about all the databases supported by **SQLAlchemy** (and that way supported by **SQLModel**) in the [SQLAlchemy documentation](https://docs.sqlalchemy.org/en/14/core/engines.html).
### Engine Echo
@@ -202,7 +202,7 @@ If you didn't know about SQLAlchemy before and are just learning **SQLModel**, y
///
-You can read a lot more about the engine in the SQLAlchemy documentation.
+You can read a lot more about the engine in the [SQLAlchemy documentation](https://docs.sqlalchemy.org/en/14/tutorial/engine.html).
**SQLModel** defines its own `create_engine()` function. It is the same as SQLAlchemy's `create_engine()`, but with the difference that it defaults to use `future=True` (which means that it uses the style of the latest SQLAlchemy, 1.4, and the future 2.0).
@@ -327,7 +327,7 @@ Put the code in a file `app.py` if you haven't already.
/// tip
-Remember to [activate the virtual environment](../virtual-environments.md#create-a-virtual-environment){.internal-link target=_blank} before running it.
+Remember to [activate the virtual environment](../virtual-environments.md#create-a-virtual-environment) before running it.
///
@@ -390,7 +390,7 @@ In the example in the previous chapter we created the table using `TEXT` for som
But in this output SQLAlchemy is using `VARCHAR` instead. Let's see what's going on.
-Remember that [each SQL Database has some different variations in what they support?](../databases.md#sql-the-language){.internal-link target=_blank}
+Remember that [each SQL Database has some different variations in what they support?](../databases.md#sql-the-language)
This is one of the differences. Each database supports some particular **data types**, like `INTEGER` and `TEXT`.
@@ -484,7 +484,7 @@ from app import Hero
That `if` block using `if __name__ == "__main__":` is sometimes called the "**main block**".
-The official name (in the Python docs) is "**Top-level script environment**".
+The official name (in the [Python docs](https://docs.python.org/3/library/__main__.html)) is "**Top-level script environment**".
///
@@ -540,7 +540,7 @@ if __name__ == "__main__":
/// info
-For more information, check the official Python docs.
+For more information, check [the official Python docs](https://docs.python.org/3/library/__main__.html).
///
diff --git a/docs/tutorial/fastapi/index.md b/docs/tutorial/fastapi/index.md
index 0d57ab9bd8..f837bb22b5 100644
--- a/docs/tutorial/fastapi/index.md
+++ b/docs/tutorial/fastapi/index.md
@@ -2,7 +2,7 @@
One of the use cases where **SQLModel** shines the most, and the main one why it was built, was to be combined with **FastAPI**. β¨
-FastAPI is a Python web framework for building web APIs created by the same author of SQLModel. FastAPI is also built on top of **Pydantic**.
+[FastAPI](https://fastapi.tiangolo.com/) is a Python web framework for building web APIs created by the same [author](https://twitter.com/tiangolo) of SQLModel. FastAPI is also built on top of **Pydantic**.
In this group of chapters we will see how to combine SQLModel **table models** representing tables in the SQL database as all the ones we have seen up to now, with **data models** that only represent data (which are actually just Pydantic models behind the scenes).
@@ -14,4 +14,4 @@ By the end we will have a **simple** but **complete** web **API** to interact wi
If you have never used FastAPI, maybe a good idea would be to go and study it a bit before continuing.
-Just reading and trying the examples on the FastAPI main page should be enough, and it shouldn't take you more than **10 minutes**.
+Just reading and trying the examples on the [FastAPI main page](https://fastapi.tiangolo.com/) should be enough, and it shouldn't take you more than **10 minutes**.
diff --git a/docs/tutorial/fastapi/limit-and-offset.md b/docs/tutorial/fastapi/limit-and-offset.md
index 1a464a664f..72ec237c20 100644
--- a/docs/tutorial/fastapi/limit-and-offset.md
+++ b/docs/tutorial/fastapi/limit-and-offset.md
@@ -36,9 +36,9 @@ This way, a client can decide to take fewer heroes if they want, but not more.
If you need to refresh how query parameters and their validation work, check out the docs in FastAPI:
-* Query Parameters
-* Query Parameters and String Validations
-* Path Parameters and Numeric Validations
+* [Query Parameters](https://fastapi.tiangolo.com/tutorial/query-params/)
+* [Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/)
+* [Path Parameters and Numeric Validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/)
///
diff --git a/docs/tutorial/fastapi/multiple-models.md b/docs/tutorial/fastapi/multiple-models.md
index 1bc045612b..9de7dbb14a 100644
--- a/docs/tutorial/fastapi/multiple-models.md
+++ b/docs/tutorial/fastapi/multiple-models.md
@@ -167,7 +167,7 @@ This will validate that all the data that we promised is there and will remove a
This filtering could be very important and could be a very good security feature, for example, to make sure you filter private data, hashed passwords, etc.
-You can read more about it in the FastAPI docs about Response Model.
+You can read more about it in the [FastAPI docs about Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
///
diff --git a/docs/tutorial/fastapi/read-one.md b/docs/tutorial/fastapi/read-one.md
index 03a65a0a2d..a56a90395e 100644
--- a/docs/tutorial/fastapi/read-one.md
+++ b/docs/tutorial/fastapi/read-one.md
@@ -10,7 +10,7 @@ We want to get the hero based on the `id`, so we will use a **path parameter** `
/// info
-If you need to refresh how *path parameters* work, including their data validation, check the FastAPI docs about Path Parameters.
+If you need to refresh how *path parameters* work, including their data validation, check the [FastAPI docs about Path Parameters](https://fastapi.tiangolo.com/tutorial/path-params/).
///
diff --git a/docs/tutorial/fastapi/relationships.md b/docs/tutorial/fastapi/relationships.md
index f789fd930a..13ca18d650 100644
--- a/docs/tutorial/fastapi/relationships.md
+++ b/docs/tutorial/fastapi/relationships.md
@@ -46,7 +46,7 @@ And the same way, we declared the `TeamPublic` with only the same base fields of
{* ./docs_src/tutorial/fastapi/teams/tutorial001_py310.py ln[5:7,20:21,29:34,43:44] hl[5:7,20:21,29:34,43:44] *}
-Now, remember that FastAPI uses the `response_model` to validate and **filter** the response data?
+Now, remember that [FastAPI uses the `response_model` to validate and **filter** the response data](https://fastapi.tiangolo.com/tutorial/response-model/)?
In this case, we used `response_model=TeamPublic` and `response_model=HeroPublic`, so FastAPI will use them to filter the response data, even if we return a **table model** that includes **relationship attributes**:
diff --git a/docs/tutorial/fastapi/response-model.md b/docs/tutorial/fastapi/response-model.md
index f9214332c6..d93354c039 100644
--- a/docs/tutorial/fastapi/response-model.md
+++ b/docs/tutorial/fastapi/response-model.md
@@ -8,7 +8,7 @@ Up to now, with the code we have used, the API docs know the data the clients ha
-This interactive docs UI is powered by Swagger UI, and what Swagger UI does is to read a big JSON content that defines the API with all the data schemas (data shapes) using the standard OpenAPI, and showing it in that nice UI.
+This interactive docs UI is powered by [Swagger UI](https://github.com/swagger-api/swagger-ui), and what Swagger UI does is to read a big JSON content that defines the API with all the data schemas (data shapes) using the standard [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md), and showing it in that nice UI.
FastAPI automatically **generates that OpenAPI** for Swagger UI to read it.
@@ -48,7 +48,7 @@ FastAPI will do data validation and filtering of the response with this `respons
So this works like a contract between our application and the client.
-You can read more about it in the FastAPI docs about `response_model`.
+You can read more about it in the [FastAPI docs about `response_model`](https://fastapi.tiangolo.com/tutorial/response-model/).
## New API Docs UI
@@ -62,7 +62,7 @@ The clients will know what data they should expect.
The most visible advantage of using the `response_model` is that it shows up in the API docs UI.
-But there are other advantages, like that FastAPI will do automatic data validation and filtering of the response data using this model.
+But there are other advantages, like that FastAPI will do automatic [data validation and filtering](https://fastapi.tiangolo.com/tutorial/response-model/) of the response data using this model.
Additionally, because the schemas are defined in using a standard, there are many tools that can take advantage of this.
@@ -72,7 +72,7 @@ For example, client generators, that can automatically create the code necessary
If you are curious about the standards, FastAPI generates OpenAPI, that internally uses JSON Schema.
-You can read about all that in the FastAPI docs - First Steps.
+You can read about all that in the [FastAPI docs - First Steps](https://fastapi.tiangolo.com/tutorial/first-steps/#openapi).
///
diff --git a/docs/tutorial/fastapi/session-with-dependency.md b/docs/tutorial/fastapi/session-with-dependency.md
index e81e9e6745..a4e6dbf8b7 100644
--- a/docs/tutorial/fastapi/session-with-dependency.md
+++ b/docs/tutorial/fastapi/session-with-dependency.md
@@ -8,7 +8,7 @@ Up to now, we have been creating a session in each *path operation*, in a `with`
{* ./docs_src/tutorial/fastapi/delete/tutorial001_py310.py ln[48:55] hl[50] *}
-That's perfectly fine, but in many use cases we would want to use FastAPI Dependencies, for example to **verify** that the client is **logged in** and get the **current user** before executing any other code in the *path operation*.
+That's perfectly fine, but in many use cases we would want to use [FastAPI Dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/), for example to **verify** that the client is **logged in** and get the **current user** before executing any other code in the *path operation*.
These dependencies are also very useful during **testing**, because we can **easily replace them**, and then, for example, use a new database for our tests, or put some data before the tests, etc.
@@ -38,7 +38,7 @@ Here we are passing the parameter `session` that has a "default value" of `Depen
Python would normally complain about that, but we can use the initial "parameter" `*,` to mark all the rest of the parameters as "keyword only", which solves the problem.
-You can read more about it in the FastAPI documentation Path Parameters and Numeric Validations - Order the parameters as you need, tricks
+You can read more about it in the FastAPI documentation [Path Parameters and Numeric Validations - Order the parameters as you need, tricks](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#order-the-parameters-as-you-need-tricks)
///
@@ -86,4 +86,4 @@ You just learned how to use **FastAPI dependencies** to handle the database sess
And you will see how much these dependencies can help the more you work with FastAPI, to handle **permissions**, **authentication**, resources like database **sessions**, etc. π
-If you want to learn more about dependencies, checkout the FastAPI docs about Dependencies.
+If you want to learn more about dependencies, checkout the [FastAPI docs about Dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/).
diff --git a/docs/tutorial/fastapi/simple-hero-api.md b/docs/tutorial/fastapi/simple-hero-api.md
index 79cf075e1b..c8060ea352 100644
--- a/docs/tutorial/fastapi/simple-hero-api.md
+++ b/docs/tutorial/fastapi/simple-hero-api.md
@@ -8,7 +8,7 @@ The first step is to install FastAPI.
FastAPI is the framework to create the **web API**.
-Make sure you create a [virtual environment](../../virtual-environments.md){.internal-link target=_blank}, activate it, and then install them, for example with:
+Make sure you create a [virtual environment](../../virtual-environments.md), activate it, and then install them, for example with: