mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-23 22:29:34 -05:00
📝 Add docs for using FastAPI Cloud (#14359)
This commit is contained in:
committed by
GitHub
parent
02e108d166
commit
994d6cc912
57
README.md
57
README.md
@@ -45,6 +45,11 @@ The key features are:
|
||||
## Sponsors
|
||||
|
||||
<!-- sponsors -->
|
||||
### Keystone Sponsor
|
||||
|
||||
<a href="https://fastapicloud.com" target="_blank" title="FastAPI Cloud. By the same team behind FastAPI. You code. We Cloud."><img src="https://fastapi.tiangolo.com/img/sponsors/fastapicloud.png"></a>
|
||||
|
||||
### Gold and Silver Sponsors
|
||||
|
||||
<a href="https://blockbee.io?ref=fastapi" target="_blank" title="BlockBee Cryptocurrency Payment Gateway"><img src="https://fastapi.tiangolo.com/img/sponsors/blockbee.png"></a>
|
||||
<a href="https://github.com/scalar/scalar/?utm_source=fastapi&utm_medium=website&utm_campaign=main-badge" target="_blank" title="Scalar: Beautiful Open-Source API References from Swagger/OpenAPI files"><img src="https://fastapi.tiangolo.com/img/sponsors/scalar.svg"></a>
|
||||
@@ -447,6 +452,58 @@ For a more complete example including more features, see the <a href="https://fa
|
||||
* **Cookie Sessions**
|
||||
* ...and more.
|
||||
|
||||
### Deploy your app (optional)
|
||||
|
||||
You can optionally deploy your FastAPI app to <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>, go and join the waiting list if you haven't. 🚀
|
||||
|
||||
If you already have a **FastAPI Cloud** account (we invited you from the waiting list 😉), you can deploy your application with one command.
|
||||
|
||||
Before deploying, make sure you are logged in:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi login
|
||||
|
||||
You are logged in to FastAPI Cloud 🚀
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
Then deploy your app:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi deploy
|
||||
|
||||
Deploying to FastAPI Cloud...
|
||||
|
||||
✅ Deployment successful!
|
||||
|
||||
🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
That's it! Now you can access your app at that URL. ✨
|
||||
|
||||
#### About FastAPI Cloud
|
||||
|
||||
**<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** is built by the same author and team behind **FastAPI**.
|
||||
|
||||
It streamlines the process of **building**, **deploying**, and **accessing** an API with minimal effort.
|
||||
|
||||
It brings the same **developer experience** of building apps with FastAPI to **deploying** them to the cloud. 🎉
|
||||
|
||||
FastAPI Cloud is the primary sponsor and funding provider for the *FastAPI and friends* open source projects. ✨
|
||||
|
||||
#### Deploy to other cloud providers
|
||||
|
||||
FastAPI is open source and based on standards. You can deploy FastAPI apps to any cloud provider you choose.
|
||||
|
||||
Follow your cloud provider's guides to deploy FastAPI apps with them. 🤓
|
||||
|
||||
## Performance
|
||||
|
||||
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as <a href="https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7" class="external-link" target="_blank">one of the fastest Python frameworks available</a>, only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
keystone:
|
||||
- url: https://fastapicloud.com
|
||||
title: FastAPI Cloud. By the same team behind FastAPI. You code. We Cloud.
|
||||
img: https://fastapi.tiangolo.com/img/sponsors/fastapicloud.png
|
||||
gold:
|
||||
- url: https://blockbee.io?ref=fastapi
|
||||
title: BlockBee Cryptocurrency Payment Gateway
|
||||
|
||||
@@ -4,13 +4,21 @@ You can use virtually **any cloud provider** to deploy your FastAPI application.
|
||||
|
||||
In most of the cases, the main cloud providers have guides to deploy FastAPI with them.
|
||||
|
||||
## FastAPI Cloud
|
||||
|
||||
**<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** is built by the same author and team behind **FastAPI**.
|
||||
|
||||
It streamlines the process of **building**, **deploying**, and **accessing** an API with minimal effort.
|
||||
|
||||
It brings the same **developer experience** of building apps with FastAPI to **deploying** them to the cloud. 🎉
|
||||
|
||||
FastAPI Cloud is the primary sponsor and funding provider for the *FastAPI and friends* open source projects. ✨
|
||||
|
||||
## Cloud Providers - Sponsors { #cloud-providers-sponsors }
|
||||
|
||||
Some cloud providers ✨ [**sponsor FastAPI**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨, this ensures the continued and healthy **development** of FastAPI and its **ecosystem**.
|
||||
Some other cloud providers ✨ [**sponsor FastAPI**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨ too. 🙇
|
||||
|
||||
And it shows their true commitment to FastAPI and its **community** (you), as they not only want to provide you a **good service** but also want to make sure you have a **good and healthy framework**, FastAPI. 🙇
|
||||
|
||||
You might want to try their services and follow their guides:
|
||||
You might also want to consider them to follow their guides and try their services:
|
||||
|
||||
* <a href="https://docs.render.com/deploy-fastapi?utm_source=deploydoc&utm_medium=referral&utm_campaign=fastapi" class="external-link" target="_blank">Render</a>
|
||||
* <a href="https://docs.railway.com/guides/fastapi?utm_medium=integration&utm_source=docs&utm_campaign=fastapi" class="external-link" target="_blank">Railway</a>
|
||||
|
||||
65
docs/en/docs/deployment/fastapicloud.md
Normal file
65
docs/en/docs/deployment/fastapicloud.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# FastAPI Cloud { #fastapi-cloud }
|
||||
|
||||
You can deploy your FastAPI app to <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a> with **one command**, go and join the waiting list if you haven't. 🚀
|
||||
|
||||
## Login { #login }
|
||||
|
||||
Make sure you already have a **FastAPI Cloud** account (we invited you from the waiting list 😉).
|
||||
|
||||
Then log in:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi login
|
||||
|
||||
You are logged in to FastAPI Cloud 🚀
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
## Deploy { #deploy }
|
||||
|
||||
Now deploy your app, with **one command**:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi deploy
|
||||
|
||||
Deploying to FastAPI Cloud...
|
||||
|
||||
✅ Deployment successful!
|
||||
|
||||
🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
That's it! Now you can access your app at that URL. ✨
|
||||
|
||||
## About FastAPI Cloud { #about-fastapi-cloud }
|
||||
|
||||
**<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** is built by the same author and team behind **FastAPI**.
|
||||
|
||||
It streamlines the process of **building**, **deploying**, and **accessing** an API with minimal effort.
|
||||
|
||||
It brings the same **developer experience** of building apps with FastAPI to **deploying** them to the cloud. 🎉
|
||||
|
||||
It will also take care of most of the things you would need when deploying an app, like:
|
||||
|
||||
* HTTPS
|
||||
* Replication, with autoscaling based on requests
|
||||
* etc.
|
||||
|
||||
FastAPI Cloud is the primary sponsor and funding provider for the *FastAPI and friends* open source projects. ✨
|
||||
|
||||
## Deploy to other cloud providers { #deploy-to-other-cloud-providers }
|
||||
|
||||
FastAPI is open source and based on standards. You can deploy FastAPI apps to any cloud provider you choose.
|
||||
|
||||
Follow your cloud provider's guides to deploy FastAPI apps with them. 🤓
|
||||
|
||||
## Deploy your own server { #deploy-your-own-server }
|
||||
|
||||
I will also teach you later in this **Deployment** guide all the details, so you can understand what is going on, what needs to happen, or how to deploy FastAPI apps on your own, also with your own servers. 🤓
|
||||
@@ -16,6 +16,8 @@ There are several ways to do it depending on your specific use case and the tool
|
||||
|
||||
You could **deploy a server** yourself using a combination of tools, you could use a **cloud service** that does part of the work for you, or other possible options.
|
||||
|
||||
For example, we, the team behind FastAPI, built <a href="https://fastapicloud.com" class="external-link" target="_blank">**FastAPI Cloud**</a>, to make deploying FastAPI apps to the cloud as streamlined as possible, with the same developer experience of working with FastAPI.
|
||||
|
||||
I will show you some of the main concepts you should probably keep in mind when deploying a **FastAPI** application (although most of it applies to any other type of web application).
|
||||
|
||||
You will see more details to keep in mind and some of the techniques to do it in the next sections. ✨
|
||||
|
||||
BIN
docs/en/docs/img/sponsors/fastapicloud.png
Normal file
BIN
docs/en/docs/img/sponsors/fastapicloud.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -52,14 +52,20 @@ The key features are:
|
||||
|
||||
<!-- sponsors -->
|
||||
|
||||
{% if sponsors %}
|
||||
### Keystone Sponsor
|
||||
|
||||
{% for sponsor in sponsors.keystone -%}
|
||||
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
|
||||
{% endfor -%}
|
||||
|
||||
### Gold and Silver Sponsors
|
||||
|
||||
{% for sponsor in sponsors.gold -%}
|
||||
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
|
||||
{% endfor -%}
|
||||
{%- for sponsor in sponsors.silver -%}
|
||||
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<!-- /sponsors -->
|
||||
|
||||
@@ -444,6 +450,58 @@ For a more complete example including more features, see the <a href="https://fa
|
||||
* **Cookie Sessions**
|
||||
* ...and more.
|
||||
|
||||
### Deploy your app (optional) { #deploy-your-app-optional }
|
||||
|
||||
You can optionally deploy your FastAPI app to <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>, go and join the waiting list if you haven't. 🚀
|
||||
|
||||
If you already have a **FastAPI Cloud** account (we invited you from the waiting list 😉), you can deploy your application with one command.
|
||||
|
||||
Before deploying, make sure you are logged in:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi login
|
||||
|
||||
You are logged in to FastAPI Cloud 🚀
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
Then deploy your app:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi deploy
|
||||
|
||||
Deploying to FastAPI Cloud...
|
||||
|
||||
✅ Deployment successful!
|
||||
|
||||
🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
That's it! Now you can access your app at that URL. ✨
|
||||
|
||||
#### About FastAPI Cloud { #about-fastapi-cloud }
|
||||
|
||||
**<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** is built by the same author and team behind **FastAPI**.
|
||||
|
||||
It streamlines the process of **building**, **deploying**, and **accessing** an API with minimal effort.
|
||||
|
||||
It brings the same **developer experience** of building apps with FastAPI to **deploying** them to the cloud. 🎉
|
||||
|
||||
FastAPI Cloud is the primary sponsor and funding provider for the *FastAPI and friends* open source projects. ✨
|
||||
|
||||
#### Deploy to other cloud providers { #deploy-to-other-cloud-providers }
|
||||
|
||||
FastAPI is open source and based on standards. You can deploy FastAPI apps to any cloud provider you choose.
|
||||
|
||||
Follow your cloud provider's guides to deploy FastAPI apps with them. 🤓
|
||||
|
||||
## Performance { #performance }
|
||||
|
||||
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as <a href="https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7" class="external-link" target="_blank">one of the fastest Python frameworks available</a>, only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
|
||||
|
||||
@@ -143,6 +143,42 @@ And there are dozens of alternatives, all based on OpenAPI. You could easily add
|
||||
|
||||
You could also use it to generate code automatically, for clients that communicate with your API. For example, frontend, mobile or IoT applications.
|
||||
|
||||
### Deploy your app (optional) { #deploy-your-app-optional }
|
||||
|
||||
You can optionally deploy your FastAPI app to <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>, go and join the waiting list if you haven't. 🚀
|
||||
|
||||
If you already have a **FastAPI Cloud** account (we invited you from the waiting list 😉), you can deploy your application with one command.
|
||||
|
||||
Before deploying, make sure you are logged in:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi login
|
||||
|
||||
You are logged in to FastAPI Cloud 🚀
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
Then deploy your app:
|
||||
|
||||
<div class="termy">
|
||||
|
||||
```console
|
||||
$ fastapi deploy
|
||||
|
||||
Deploying to FastAPI Cloud...
|
||||
|
||||
✅ Deployment successful!
|
||||
|
||||
🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
That's it! Now you can access your app at that URL. ✨
|
||||
|
||||
## Recap, step by step { #recap-step-by-step }
|
||||
|
||||
### Step 1: import `FastAPI` { #step-1-import-fastapi }
|
||||
@@ -314,6 +350,26 @@ You can also return Pydantic models (you'll see more about that later).
|
||||
|
||||
There are many other objects and models that will be automatically converted to JSON (including ORMs, etc). Try using your favorite ones, it's highly probable that they are already supported.
|
||||
|
||||
### Step 6: Deploy it { #step-6-deploy-it }
|
||||
|
||||
Deploy your app to **<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** with one command: `fastapi deploy`. 🎉
|
||||
|
||||
#### About FastAPI Cloud { #about-fastapi-cloud }
|
||||
|
||||
**<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** is built by the same author and team behind **FastAPI**.
|
||||
|
||||
It streamlines the process of **building**, **deploying**, and **accessing** an API with minimal effort.
|
||||
|
||||
It brings the same **developer experience** of building apps with FastAPI to **deploying** them to the cloud. 🎉
|
||||
|
||||
FastAPI Cloud is the primary sponsor and funding provider for the *FastAPI and friends* open source projects. ✨
|
||||
|
||||
#### Deploy to other cloud providers { #deploy-to-other-cloud-providers }
|
||||
|
||||
FastAPI is open source and based on standards. You can deploy FastAPI apps to any cloud provider you choose.
|
||||
|
||||
Follow your cloud provider's guides to deploy FastAPI apps with them. 🤓
|
||||
|
||||
## Recap { #recap }
|
||||
|
||||
* Import `FastAPI`.
|
||||
@@ -321,3 +377,4 @@ There are many other objects and models that will be automatically converted to
|
||||
* Write a **path operation decorator** using decorators like `@app.get("/")`.
|
||||
* Define a **path operation function**; for example, `def root(): ...`.
|
||||
* Run the development server using the command `fastapi dev`.
|
||||
* Optionally deploy your app with `fastapi deploy`.
|
||||
|
||||
@@ -192,6 +192,7 @@ nav:
|
||||
- Deployment:
|
||||
- deployment/index.md
|
||||
- deployment/versions.md
|
||||
- deployment/fastapicloud.md
|
||||
- deployment/https.md
|
||||
- deployment/manually.md
|
||||
- deployment/concepts.md
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
{% block announce %}
|
||||
<div class="announce-wrapper">
|
||||
<div id="announce-left">
|
||||
<div class="item">
|
||||
<a class="announce-link" href="https://fastapicloud.com" target="_blank">
|
||||
<span class="twemoji">
|
||||
{% include ".icons/material/cloud-arrow-up.svg" %}
|
||||
</span> Join the <strong>FastAPI Cloud</strong> waiting list 🚀
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a class="announce-link" href="https://x.com/fastapi" target="_blank">
|
||||
<span class="twemoji">
|
||||
|
||||
@@ -145,14 +145,20 @@ def build_lang(
|
||||
|
||||
|
||||
index_sponsors_template = """
|
||||
{% if sponsors %}
|
||||
### Keystone Sponsor
|
||||
|
||||
{% for sponsor in sponsors.keystone -%}
|
||||
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}"></a>
|
||||
{% endfor %}
|
||||
### Gold and Silver Sponsors
|
||||
|
||||
{% for sponsor in sponsors.gold -%}
|
||||
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}"></a>
|
||||
{% endfor -%}
|
||||
{%- for sponsor in sponsors.silver -%}
|
||||
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}"></a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user