You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The key features are:
34
34
***Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](#performance).
35
35
***Fast to code**: Increase the speed to develop features by about 200% to 300%. *
36
36
***Fewer bugs**: Reduce about 40% of human (developer) induced errors. *
37
-
***Intuitive**: Great editor support. <abbrtitle="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
37
+
***Intuitive**: Great editor support. <dfntitle="also known as auto-complete, autocompletion, IntelliSense">Completion</dfn> everywhere. Less time debugging.
38
38
***Easy**: Designed to be easy to use and learn. Less time reading docs.
39
39
***Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
40
40
***Robust**: Get production-ready code. With automatic interactive documentation.
@@ -371,15 +371,15 @@ item: Item
371
371
* Validation of data:
372
372
* Automatic and clear errors when the data is invalid.
373
373
* Validation even for deeply nested JSON objects.
374
-
* <abbrtitle="also known as: serialization, parsing, marshalling">Conversion</abbr> of input data: coming from the network to Python data and types. Reading from:
374
+
* <dfntitle="also known as: serialization, parsing, marshalling">Conversion</dfn> of input data: coming from the network to Python data and types. Reading from:
375
375
* JSON.
376
376
* Path parameters.
377
377
* Query parameters.
378
378
* Cookies.
379
379
* Headers.
380
380
* Forms.
381
381
* Files.
382
-
* <abbrtitle="also known as: serialization, parsing, marshalling">Conversion</abbr> of output data: converting from Python data and types to network data (as JSON):
382
+
* <dfntitle="also known as: serialization, parsing, marshalling">Conversion</dfn> of output data: converting from Python data and types to network data (as JSON):
@@ -442,7 +442,7 @@ For a more complete example including more features, see the <a href="https://fa
442
442
443
443
* Declaration of **parameters** from other different places as: **headers**, **cookies**, **form fields** and **files**.
444
444
* How to set **validation constraints** as `maximum_length` or `regex`.
445
-
* A very powerful and easy to use **<abbrtitle="also known as components, resources, providers, services, injectables">Dependency Injection</abbr>** system.
445
+
* A very powerful and easy to use **<dfntitle="also known as components, resources, providers, services, injectables">Dependency Injection</dfn>** system.
446
446
* Security and authentication, including support for **OAuth2** with **JWT tokens** and **HTTP Basic** auth.
447
447
* More advanced (but equally easy) techniques for declaring **deeply nested JSON models** (thanks to Pydantic).
448
448
***GraphQL** integration with <ahref="https://strawberry.rocks"class="external-link"target="_blank">Strawberry</a> and other libraries.
@@ -527,7 +527,7 @@ Used by Starlette:
527
527
528
528
* <ahref="https://www.python-httpx.org"target="_blank"><code>httpx</code></a> - Required if you want to use the `TestClient`.
529
529
* <ahref="https://jinja.palletsprojects.com"target="_blank"><code>jinja2</code></a> - Required if you want to use the default template configuration.
530
-
* <ahref="https://github.com/Kludex/python-multipart"target="_blank"><code>python-multipart</code></a> - Required if you want to support form <abbrtitle="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>, with `request.form()`.
530
+
* <ahref="https://github.com/Kludex/python-multipart"target="_blank"><code>python-multipart</code></a> - Required if you want to support form <dfntitle="converting the string that comes from an HTTP request into Python data">"parsing"</dfn>, with `request.form()`.
In this example, we didn't declare any Pydantic model. In fact, the request body is not even <abbrtitle="converted from some plain format, like bytes, into Python objects">parsed</abbr> as JSON, it is read directly as `bytes`, and the function `magic_data_reader()` would be in charge of parsing it in some way.
144
+
In this example, we didn't declare any Pydantic model. In fact, the request body is not even <dfntitle="converted from some plain format, like bytes, into Python objects">parsed</dfn> as JSON, it is read directly as `bytes`, and the function `magic_data_reader()` would be in charge of parsing it in some way.
145
145
146
146
Nevertheless, we can declare the expected schema for the request body.
One of the main features needed by API systems is data "<abbrtitle="also called marshalling, conversion">serialization</abbr>" which is taking data from the code (Python) and converting it into something that can be sent through the network. For example, converting an object containing data from a database into a JSON object. Converting `datetime` objects into strings, etc.
140
+
One of the main features needed by API systems is data "<dfntitle="also called marshalling, conversion">serialization</dfn>" which is taking data from the code (Python) and converting it into something that can be sent through the network. For example, converting an object containing data from a database into a JSON object. Converting `datetime` objects into strings, etc.
141
141
142
142
Another big feature needed by APIs is data validation, making sure that the data is valid, given certain parameters. For example, that some field is an `int`, and not some random string. This is especially useful for incoming data.
143
143
144
144
Without a data validation system, you would have to do all the checks by hand, in code.
145
145
146
146
These features are what Marshmallow was built to provide. It is a great library, and I have used it a lot before.
147
147
148
-
But it was created before there existed Python type hints. So, to define every <abbrtitle="the definition of how data should be formed">schema</abbr> you need to use specific utils and classes provided by Marshmallow.
148
+
But it was created before there existed Python type hints. So, to define every <dfntitle="the definition of how data should be formed">schema</dfn> you need to use specific utils and classes provided by Marshmallow.
149
149
150
150
/// check | Inspired **FastAPI** to
151
151
@@ -155,7 +155,7 @@ Use code to define "schemas" that provide data types and validation, automatical
Starlette is a lightweight <abbrtitle="The new standard for building asynchronous Python web applications">ASGI</abbr> framework/toolkit, which is ideal for building high-performance asyncio services.
422
+
Starlette is a lightweight <dfntitle="The new standard for building asynchronous Python web applications">ASGI</dfn> framework/toolkit, which is ideal for building high-performance asyncio services.
423
423
424
424
It is very simple and intuitive. It's designed to be easily extensible, and have modular components.
Copy file name to clipboardExpand all lines: docs/en/docs/deployment/docker.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -454,7 +454,7 @@ Without using containers, making applications run on startup and with restarts c
454
454
455
455
## Replication - Number of Processes { #replication-number-of-processes }
456
456
457
-
If you have a <abbrtitle="A group of machines that are configured to be connected and work together in some way.">cluster</abbr> of machines with **Kubernetes**, Docker Swarm Mode, Nomad, or another similar complex system to manage distributed containers on multiple machines, then you will probably want to **handle replication** at the **cluster level** instead of using a **process manager** (like Uvicorn with workers) in each container.
457
+
If you have a <dfntitle="A group of machines that are configured to be connected and work together in some way.">cluster</dfn> of machines with **Kubernetes**, Docker Swarm Mode, Nomad, or another similar complex system to manage distributed containers on multiple machines, then you will probably want to **handle replication** at the **cluster level** instead of using a **process manager** (like Uvicorn with workers) in each container.
458
458
459
459
One of those distributed container management systems like Kubernetes normally has some integrated way of handling **replication of containers** while still supporting **load balancing** for the incoming requests. All at the **cluster level**.
Copy file name to clipboardExpand all lines: docs/en/docs/deployment/https.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ Here's an example of how an HTTPS API could look like, step by step, paying atte
65
65
66
66
It would probably all start by you **acquiring** some **domain name**. Then, you would configure it in a DNS server (possibly your same cloud provider).
67
67
68
-
You would probably get a cloud server (a virtual machine) or something similar, and it would have a <abbrtitle="That doesn't change">fixed</abbr> **public IP address**.
68
+
You would probably get a cloud server (a virtual machine) or something similar, and it would have a <dfntitle="Doesn't change over time. Not dynamic.">fixed</dfn> **public IP address**.
69
69
70
70
In the DNS server(s) you would configure a record (an "`A record`") to point **your domain** to the public **IP address of your server**.
Copy file name to clipboardExpand all lines: docs/en/docs/features.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
### Based on open standards { #based-on-open-standards }
8
8
9
-
* <ahref="https://github.com/OAI/OpenAPI-Specification"class="external-link"target="_blank"><strong>OpenAPI</strong></a> for API creation, including declarations of <abbrtitle="also known as: endpoints, routes">path</abbr> <abbrtitle="also known as HTTP methods, as POST, GET, PUT, DELETE">operations</abbr>, parameters, request bodies, security, etc.
9
+
* <ahref="https://github.com/OAI/OpenAPI-Specification"class="external-link"target="_blank"><strong>OpenAPI</strong></a> for API creation, including declarations of <dfntitle="also known as: endpoints, routes">path</dfn> <dfntitle="also known as HTTP methods, as POST, GET, PUT, DELETE">operations</dfn>, parameters, request bodies, security, etc.
10
10
* Automatic data model documentation with <ahref="https://json-schema.org/"class="external-link"target="_blank"><strong>JSON Schema</strong></a> (as OpenAPI itself is based on JSON Schema).
11
11
* Designed around these standards, after a meticulous study. Instead of an afterthought layer on top.
12
12
* This also allows using automatic **client code generation** in many languages.
@@ -136,7 +136,7 @@ All built as reusable tools and components that are easy to integrate with your
FastAPI includes an extremely easy to use, but extremely powerful <abbrtitle='also known as "components", "resources", "services", "providers"'><strong>Dependency Injection</strong></abbr> system.
139
+
FastAPI includes an extremely easy to use, but extremely powerful <dfntitle='also known as "components", "resources", "services", "providers"'><strong>Dependency Injection</strong></dfn> system.
140
140
141
141
* Even dependencies can have dependencies, creating a hierarchy or **"graph" of dependencies**.
142
142
* All **automatically handled** by the framework.
@@ -153,8 +153,8 @@ Any integration is designed to be so simple to use (with dependencies) that you
153
153
154
154
### Tested { #tested }
155
155
156
-
* 100% <abbrtitle="The amount of code that is automatically tested">test coverage</abbr>.
157
-
* 100% <abbrtitle="Python type annotations, with this your editor and external tools can give you better support">type annotated</abbr> code base.
156
+
* 100% <dfntitle="The amount of code that is automatically tested">test coverage</dfn>.
157
+
* 100% <dfntitle="Python type annotations, with this your editor and external tools can give you better support">type annotated</dfn> code base.
158
158
* Used in production applications.
159
159
160
160
## Starlette features { #starlette-features }
@@ -190,7 +190,7 @@ With **FastAPI** you get all of **Pydantic**'s features (as FastAPI is based on
190
190
***No brainfuck**:
191
191
* No new schema definition micro-language to learn.
192
192
* If you know Python types you know how to use Pydantic.
193
-
* Plays nicely with your **<abbrtitle="Integrated Development Environment: similar to a code editor">IDE</abbr>/<abbrtitle="A program that checks for code errors">linter</abbr>/brain**:
193
+
* Plays nicely with your **<abbrtitle="Integrated Development Environment: similar to a code editor">IDE</abbr>/<dfntitle="A program that checks for code errors">linter</dfn>/brain**:
194
194
* Because pydantic data structures are just instances of classes you define; auto-completion, linting, mypy and your intuition should all work properly with your validated data.
195
195
* Validate **complex structures**:
196
196
* Use of hierarchical Pydantic models, Python `typing`’s `List` and `Dict`, etc.
Copy file name to clipboardExpand all lines: docs/en/docs/index.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ The key features are:
40
40
***Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](#performance).
41
41
***Fast to code**: Increase the speed to develop features by about 200% to 300%. *
42
42
***Fewer bugs**: Reduce about 40% of human (developer) induced errors. *
43
-
***Intuitive**: Great editor support. <abbrtitle="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
43
+
***Intuitive**: Great editor support. <dfntitle="also known as auto-complete, autocompletion, IntelliSense">Completion</dfn> everywhere. Less time debugging.
44
44
***Easy**: Designed to be easy to use and learn. Less time reading docs.
45
45
***Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
46
46
***Robust**: Get production-ready code. With automatic interactive documentation.
@@ -368,15 +368,15 @@ item: Item
368
368
* Validation of data:
369
369
* Automatic and clear errors when the data is invalid.
370
370
* Validation even for deeply nested JSON objects.
371
-
* <abbrtitle="also known as: serialization, parsing, marshalling">Conversion</abbr> of input data: coming from the network to Python data and types. Reading from:
371
+
* <dfntitle="also known as: serialization, parsing, marshalling">Conversion</dfn> of input data: coming from the network to Python data and types. Reading from:
372
372
* JSON.
373
373
* Path parameters.
374
374
* Query parameters.
375
375
* Cookies.
376
376
* Headers.
377
377
* Forms.
378
378
* Files.
379
-
* <abbrtitle="also known as: serialization, parsing, marshalling">Conversion</abbr> of output data: converting from Python data and types to network data (as JSON):
379
+
* <dfntitle="also known as: serialization, parsing, marshalling">Conversion</dfn> of output data: converting from Python data and types to network data (as JSON):
@@ -439,7 +439,7 @@ For a more complete example including more features, see the <a href="https://fa
439
439
440
440
* Declaration of **parameters** from other different places as: **headers**, **cookies**, **form fields** and **files**.
441
441
* How to set **validation constraints** as `maximum_length` or `regex`.
442
-
* A very powerful and easy to use **<abbrtitle="also known as components, resources, providers, services, injectables">Dependency Injection</abbr>** system.
442
+
* A very powerful and easy to use **<dfntitle="also known as components, resources, providers, services, injectables">Dependency Injection</dfn>** system.
443
443
* Security and authentication, including support for **OAuth2** with **JWT tokens** and **HTTP Basic** auth.
444
444
* More advanced (but equally easy) techniques for declaring **deeply nested JSON models** (thanks to Pydantic).
445
445
***GraphQL** integration with <ahref="https://strawberry.rocks"class="external-link"target="_blank">Strawberry</a> and other libraries.
@@ -524,7 +524,7 @@ Used by Starlette:
524
524
525
525
* <ahref="https://www.python-httpx.org"target="_blank"><code>httpx</code></a> - Required if you want to use the `TestClient`.
526
526
* <ahref="https://jinja.palletsprojects.com"target="_blank"><code>jinja2</code></a> - Required if you want to use the default template configuration.
527
-
* <ahref="https://github.com/Kludex/python-multipart"target="_blank"><code>python-multipart</code></a> - Required if you want to support form <abbrtitle="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>, with `request.form()`.
527
+
* <ahref="https://github.com/Kludex/python-multipart"target="_blank"><code>python-multipart</code></a> - Required if you want to support form <dfntitle="converting the string that comes from an HTTP request into Python data">"parsing"</dfn>, with `request.form()`.
0 commit comments