]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:pencil2: Fix typos
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 2 Mar 2019 15:54:52 +0000 (19:54 +0400)
committerSebastián Ramírez <tiangolo@gmail.com>
Sat, 2 Mar 2019 15:54:52 +0000 (19:54 +0400)
18 files changed:
docs/alternatives.md
docs/async.md
docs/contributing.md
docs/deployment.md
docs/features.md
docs/python-types.md
docs/tutorial/extra-models.md
docs/tutorial/first-steps.md
docs/tutorial/handling-errors.md
docs/tutorial/intro.md
docs/tutorial/query-params-str-validations.md
docs/tutorial/request-files.md
docs/tutorial/request-forms.md
docs/tutorial/response-model.md
docs/tutorial/security/get-current-user.md
docs/tutorial/security/simple-oauth2.md
docs/tutorial/sql-databases.md
docs/tutorial/using-request-directly.md

index 8bb52d4e2d882c869daa1364c14446dd08660cd5..dcf3cc49318aaf60313cf54a5d08c183acdbbecd 100644 (file)
@@ -123,7 +123,7 @@ There are several Flask REST frameworks, but after investing the time and work i
 
 ### <a href="https://marshmallow.readthedocs.io/en/3.0/" target="_blank">Marshmallow</a>
 
-One of the main features needed by API systems is data "<abbr title="also called marshalling, convertion">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.
+One of the main features needed by API systems is data "<abbr title="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.
 
 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.
 
@@ -365,7 +365,7 @@ It is the recommended server for Starlette and **FastAPI**.
 !!! check "**FastAPI** recommends it as"
     The main web server to run **FastAPI** applications.
 
-    You can combine it with Gunicorn, to have an asynchronous multiprocess server.
+    You can combine it with Gunicorn, to have an asynchronous multi-process server.
 
     Check more details in the <a href="/deployment/" target="_blank">Deployment</a> section.
 
index ba6d1b647c214b4802cd0fd244ec24664e5b3c81..6013d217ea76e4a6bb3563557c498d13f85304f2 100644 (file)
@@ -391,7 +391,7 @@ Any other utility function that you call directly can be created with normal `de
 
 This is in contrast to the functions that FastAPI calls for you: *path operation functions* and dependencies.
 
-If your utility funciton is a normal function with `def`, it will be called directly (as you write it in your code), not in a threadpool, if the function is created with `async def` then you should await for that function when you call it in your code.
+If your utility function is a normal function with `def`, it will be called directly (as you write it in your code), not in a threadpool, if the function is created with `async def` then you should await for that function when you call it in your code.
 
 ---
 
index 8ce812fb2b3e05cbc3a8ea5876dd76acea00431b..170d2aa03694d79a368215c82c27b3931a0e5fa8 100644 (file)
@@ -74,7 +74,7 @@ All the documentation is in Markdown format in the directory `./docs`.
 
 Many of the tutorials have blocks of code.
 
-In most of the cases, these blocks of code are actual complete applicactions that can be run as is.
+In most of the cases, these blocks of code are actual complete applications that can be run as is.
 
 In fact, those blocks of code are not written inside the Markdown, they are Python files in the `./docs/src/` directory.
 
index 717665032424f4b5dbc0eb3062dbed912720ee9e..69c3a05b36a163a2b9267fb834319befc81e157d 100644 (file)
@@ -157,7 +157,7 @@ Now, from a developer's perspective, here are several things to have in mind whi
     * It goes encrypted, but the encrypted contents are the same HTTP protocol.
 
 
-It is a common practice to have one program/HTTP server runing in the server (the machine, host, etc) and managing all the HTTPS parts, sending the decrypted HTTP requests to the actual HTTP application running in the same server (the **FastAPI** application, in this case), take the HTTP response from the application, encrypt it using the appropriate certificate and sending it back to the client using HTTPS. This server is ofter called a <a href="https://en.wikipedia.org/wiki/TLS_termination_proxy" target="_blank">TLS Termination Proxy</a>.
+It is a common practice to have one program/HTTP server running in the server (the machine, host, etc) and managing all the HTTPS parts, sending the decrypted HTTP requests to the actual HTTP application running in the same server (the **FastAPI** application, in this case), take the HTTP response from the application, encrypt it using the appropriate certificate and sending it back to the client using HTTPS. This server is ofter called a <a href="https://en.wikipedia.org/wiki/TLS_termination_proxy" target="_blank">TLS Termination Proxy</a>.
 
 
 ### Let's Encrypt
index e6709c19e1dc4c8e9bef64e1d6142e2740d27855..58fd702c266aa3264c85c4ba0f6fae5daa916d6b 100644 (file)
@@ -71,7 +71,7 @@ my_second_user: User = User(**second_user_data)
 
 ### Editor support
 
-All the framework was designed to be easy and intuitive to use, all the decisons where tested on multiple editors even before starting development, to ensure the best development experience.
+All the framework was designed to be easy and intuitive to use, all the decisions where tested on multiple editors even before starting development, to ensure the best development experience.
 
 In the last Python developer survey it was clear <a href="https://www.jetbrains.com/research/python-developers-survey-2017/#tools-and-features" target="_blank">that the most used feature is "autocompletion"</a>. 
 
@@ -89,7 +89,7 @@ Here's how your editor might help you:
 
 ![editor support](img/pycharm-completion.png)
 
-You will get completion in code you might even consider imposible before. As for example, the `price` key inside a JSON body (that could have been nested) that comes from a request.
+You will get completion in code you might even consider impossible before. As for example, the `price` key inside a JSON body (that could have been nested) that comes from a request.
 
 No more typing the wrong key names, coming back and forth between docs, or scrolling up and down to find if you finally used `username` or `user_name`.
 
@@ -201,4 +201,4 @@ With **FastAPI** you get all of **Pydantic**'s features (as FastAPI is based on
     * You can have deeply **nested JSON** objects and have them all validated and annotated.
 * **Extendible**:
     * Pydantic allows custom data types to be defined or you can extend validation with methods on a model decorated with the validator decorator.
-* 100% test coverage.
\ No newline at end of file
+* 100% test coverage.
index 9483d92a268f1212ded68de48fafcd99803ad4fe..e5ea654424abef42537572bd3a5b30e09404cec1 100644 (file)
@@ -49,7 +49,7 @@ But then you have to call "that method that converts the first letter to upper c
 
 Was it `upper`? Was it `uppercase`? `first_uppercase`? `capitalize`?
 
-Then, you try with the old programer's friend, editor autocompletion.
+Then, you try with the old programmer's friend, editor autocompletion.
 
 You type the first parameter of the function, `first_name`, then a dot (`.`) and then hit `Ctrl+Space` to trigger the completion.
 
index 08507d90025d40836d77488fdf9c64038e621586..04c20ade365f18f0a23df99f7656e94befe96829 100644 (file)
@@ -109,7 +109,7 @@ UserInDB(**user_in.dict())
 
 So, we get a Pydantic model from the data in another Pydantic model.
 
-#### Unrapping a `dict` and extra keywords
+#### Unwrapping a `dict` and extra keywords
 
 And then adding the extra keyword argument `hashed_password=hashed_password`, like in:
 
index cf0809692806fb05b60a095fcfae1ced28d3c0a9..a0da2eb6781def1245637e84fecd28056921d4bb 100644 (file)
@@ -69,7 +69,7 @@ A "schema" is a definition or description of something. Not the code that implem
 
 In this case, OpenAPI is a specification that dictates how to define a schema of your API.
 
-This OpenAPI schema would include your API paths, the posible parameters they take, etc.
+This OpenAPI schema would include your API paths, the possible parameters they take, etc.
 
 #### Data "schema"
 
index 1c143da29a74bc041609681237dbc2de2c7c62ac..d0557c4abd3d27a83749b40c96e8fd3f5346f0c4 100644 (file)
@@ -96,4 +96,4 @@ For example, you could override the default exception handler with:
 !!! info
     Note that in this example we set the exception handler with Starlette's `HTTPException` instead of FastAPI's `HTTPException`.
 
-    This would ensure that if you use a plug-in or any other third-party tool that raises Starlette's `HTTPException` directly, it will be catched by your exception handler.
+    This would ensure that if you use a plug-in or any other third-party tool that raises Starlette's `HTTPException` directly, it will be caught by your exception handler.
index 2faead19d3fb595aa20863836b55f14205132f48..c864e42f634efadbd65052dc10ed180b611f7437 100644 (file)
@@ -1,6 +1,6 @@
 This tutorial shows you how to use **FastAPI** with all its features, step by step.
 
-Eeach section gradually builds on the previous ones, but it's structured to separate topics, so that you can go directly to any specific one to solve your specific API needs.
+Each section gradually builds on the previous ones, but it's structured to separate topics, so that you can go directly to any specific one to solve your specific API needs.
 
 It is also built to work as a future reference.
 
index a44099aeaa60c6087f5f6441ac2181bd885dd42d..9189a6a50a161695da9bfa54f8c3349b019a76aa 100644 (file)
@@ -1,4 +1,4 @@
-**FastAPI** allows you to declare additonal information and validation for your parameters.
+**FastAPI** allows you to declare additional information and validation for your parameters.
 
 Let's take this application as example:
 
index 835468ca4c8ec309c9204d9051d198b0fee67cbc..e97fa9556026cc33dcf2239663f1f4c038514222 100644 (file)
@@ -35,7 +35,7 @@ The way HTML forms (`<form></form>`) sends the data to the server normally uses
 
     But when the form includes files, it is encoded as `multipart/form-data`. If you use `File`, **FastAPI** will know it has to get the files from the correct part of the body.
     
-    If you want to read more about these encondings and form fields, head to the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr> web docs for <code>POST</code></a>.
+    If you want to read more about these encodings and form fields, head to the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr> web docs for <code>POST</code></a>.
 
 
 !!! warning
index 1f0d9d5d360e623ed79f88d166980d7c6c161e6b..4fe88fa494e59081e5d74646512f73a846bcf2e5 100644 (file)
@@ -39,7 +39,7 @@ The way HTML forms (`<form></form>`) sends the data to the server normally uses
 
     But when the form includes files, it is encoded as `multipart/form-data`. You'll read about handling files in the next chapter.
     
-    If you want to read more about these encondings and form fields, head to the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr> web docs for <code>POST</code></a>.
+    If you want to read more about these encodings and form fields, head to the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr> web docs for <code>POST</code></a>.
 
 
 !!! warning
index 2dce3a863ba2af4bf56043ce75fd02fcdc5a4893..128206a40a8ac1e642dea189acb790e6440a308b 100644 (file)
@@ -40,7 +40,7 @@ And we are using this model to declare our input and the same model to declare o
 
 Now, whenever a browser is creating a user with a password, the API will return the same password in the response.
 
-In this case, it might not be a problem, becase the user himself is sending the password.
+In this case, it might not be a problem, because the user himself is sending the password.
 
 But if we use the same model for another path operation, we could be sending the passwords of our users to every client.
 
index 88099fb27f9daf9e873c1a6fcd49ba3096d1ebd0..494e4f26f26408eeff479a0c65601842ea61aa76 100644 (file)
@@ -30,7 +30,7 @@ So, we can have sub-dependencies using `Security` too.
 
 `get_current_user` will have a `Security` dependency with the same `oauth2_scheme` we created before.
 
-The same as we were doing before in the path operation direclty, our new dependency will receive a `token` as a `str` from the `Security` dependency:
+The same as we were doing before in the path operation directly, our new dependency will receive a `token` as a `str` from the `Security` dependency:
 
 ```Python hl_lines="25"
 {!./src/security/tutorial002.py!}
index 13d44b96772fc674968508f32a0efebee56e1c33..2068a6e830f7d64efe30dc6c1cd31a93082af74b 100644 (file)
@@ -24,14 +24,14 @@ The form field name is `scope` (in singular), but it is actually a long string w
 
 Each "scope" is just a string (without spaces).
 
-They are normally used to declare specific security permissions, for exampe:
+They are normally used to declare specific security permissions, for example:
 
 * `"users:read"` or `"users:write"` are common examples.
 * `instagram_basic` is used by Facebook / Instagram.
 * `https://www.googleapis.com/auth/drive` is used by Google.
 
 !!! info
-    In OAuth2 a "scope" is just a string that declares a specific permision required.
+    In OAuth2 a "scope" is just a string that declares a specific permission required.
 
     It doesn't matter if it has other characters like `:`, or if it is a URL.
     
index ab7719f959496279fd4a4476571dbdb5e17f1c7d..57c3ec5260a21e77b27453657a2f90f10e7b08e6 100644 (file)
@@ -300,7 +300,7 @@ That's something that you can improve in this example application, here's the cu
 }
 ```
 
-## Interact with the database direclty
+## Interact with the database directly
 
 If you want to explore the SQLite database (file) directly, independently of FastAPI, to debug its contents, add tables, columns, records, modify data, etc. you can use <a href="https://sqlitebrowser.org/" target="_blank">DB Browser for SQLite</a>.
 
index fe4f93b9c7ebdc77f9119b096326fe40578274ce..1c00731eb198c0e7062ad60cca747a3ef6b2d0f1 100644 (file)
@@ -21,7 +21,7 @@ Although any other parameter declared normally (for example, the body with a Pyd
 
 But there are specific cases where it's useful to get the `Request` object.
 
-## Use the `Request` object direclty
+## Use the `Request` object directly
 
 Let's imagine you want to get the client's IP address/host inside of your *path operation function*.