committed by
GitHub
65 changed files with 1514 additions and 652 deletions
@ -19,18 +19,16 @@ jobs: |
|||||
run: | |
run: | |
||||
rm -rf ./site |
rm -rf ./site |
||||
mkdir ./site |
mkdir ./site |
||||
- name: Download Artifact Docs |
- uses: actions/download-artifact@v4 |
||||
id: download |
|
||||
uses: dawidd6/[email protected] |
|
||||
with: |
with: |
||||
if_no_artifact_found: ignore |
|
||||
github_token: ${{ secrets.FASTAPI_PREVIEW_DOCS_DOWNLOAD_ARTIFACTS }} |
|
||||
workflow: build-docs.yml |
|
||||
run_id: ${{ github.event.workflow_run.id }} |
|
||||
name: docs-site |
|
||||
path: ./site/ |
path: ./site/ |
||||
|
pattern: docs-site-* |
||||
|
merge-multiple: true |
||||
|
github-token: ${{ secrets.FASTAPI_PREVIEW_DOCS_DOWNLOAD_ARTIFACTS }} |
||||
|
run-id: ${{ github.event.workflow_run.id }} |
||||
- name: Deploy to Cloudflare Pages |
- name: Deploy to Cloudflare Pages |
||||
if: steps.download.outputs.found_artifact == 'true' |
# hashFiles returns an empty string if there are no files |
||||
|
if: hashFiles('./site/*') |
||||
id: deploy |
id: deploy |
||||
uses: cloudflare/pages-action@v1 |
uses: cloudflare/pages-action@v1 |
||||
with: |
with: |
||||
|
@ -24,13 +24,14 @@ jobs: |
|||||
|
|
||||
- run: pip install smokeshow |
- run: pip install smokeshow |
||||
|
|
||||
- uses: dawidd6/[email protected].4 |
- uses: actions/download-artifact@v4 |
||||
with: |
with: |
||||
github_token: ${{ secrets.FASTAPI_SMOKESHOW_DOWNLOAD_ARTIFACTS }} |
name: coverage-html |
||||
workflow: test.yml |
path: htmlcov |
||||
commit: ${{ github.event.workflow_run.head_sha }} |
github-token: ${{ secrets.FASTAPI_SMOKESHOW_DOWNLOAD_ARTIFACTS }} |
||||
|
run-id: ${{ github.event.workflow_run.id }} |
||||
|
|
||||
- run: smokeshow upload coverage-html |
- run: smokeshow upload htmlcov |
||||
env: |
env: |
||||
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} |
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} |
||||
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100 |
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100 |
||||
|
File diff suppressed because it is too large
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 30 KiB |
@ -0,0 +1,178 @@ |
|||||
|
# Ludzie FastAPI |
||||
|
|
||||
|
FastAPI posiada wspaniałą społeczność, która jest otwarta dla ludzi z każdego środowiska. |
||||
|
|
||||
|
## Twórca - Opienik |
||||
|
|
||||
|
Cześć! 👋 |
||||
|
|
||||
|
To ja: |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.maintainers %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">Liczba odpowiedzi: {{ user.answers }}</div><div class="count">Pull Requesty: {{ user.prs }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
Jestem twórcą i opiekunem **FastAPI**. Możesz przeczytać więcej na ten temat w [Pomoc FastAPI - Uzyskaj pomoc - Skontaktuj się z autorem](help-fastapi.md#connect-with-the-author){.internal-link target=_blank}. |
||||
|
|
||||
|
...Ale tutaj chcę pokazać Ci społeczność. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
**FastAPI** otrzymuje wiele wsparcia od społeczności. Chciałbym podkreślić ich wkład. |
||||
|
|
||||
|
To są ludzie, którzy: |
||||
|
|
||||
|
* [Pomagają innym z pytaniami na GitHub](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}. |
||||
|
* [Tworzą Pull Requesty](help-fastapi.md#create-a-pull-request){.internal-link target=_blank}. |
||||
|
* Oceniają Pull Requesty, [to szczególnie ważne dla tłumaczeń](contributing.md#translations){.internal-link target=_blank}. |
||||
|
|
||||
|
Proszę o brawa dla nich. 👏 🙇 |
||||
|
|
||||
|
## Najaktywniejsi użytkownicy w zeszłym miesiącu |
||||
|
|
||||
|
Oto niektórzy użytkownicy, którzy [pomagali innym w największej liczbie pytań na GitHubie](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank} podczas ostatniego miesiąca. ☕ |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.last_month_active %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">Udzielonych odpowiedzi: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
## Eksperci |
||||
|
|
||||
|
Oto **eksperci FastAPI**. 🤓 |
||||
|
|
||||
|
To użytkownicy, którzy [pomogli innym z największa liczbą pytań na GitHubie](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank} od *samego początku*. |
||||
|
|
||||
|
Poprzez pomoc wielu innym, udowodnili, że są ekspertami. ✨ |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.experts %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">Udzielonych odpowiedzi: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
## Najlepsi Kontrybutorzy |
||||
|
|
||||
|
Oto **Najlepsi Kontrybutorzy**. 👷 |
||||
|
|
||||
|
Ci użytkownicy [stworzyli najwięcej Pull Requestów](help-fastapi.md#create-a-pull-request){.internal-link target=_blank}, które zostały *wcalone*. |
||||
|
|
||||
|
Współtworzyli kod źródłowy, dokumentację, tłumaczenia itp. 📦 |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.top_contributors %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">Pull Requesty: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
Jest wielu więcej kontrybutorów (ponad setka), możesz zobaczyć ich wszystkich na stronie <a href="https://github.com/tiangolo/fastapi/graphs/contributors" class="external-link" target="_blank">Kontrybutorzy FastAPI na GitHub</a>. 👷 |
||||
|
|
||||
|
## Najlepsi Oceniajacy |
||||
|
|
||||
|
Ci uzytkownicy są **Najlepszymi oceniającymi**. 🕵️ |
||||
|
|
||||
|
### Oceny Tłumaczeń |
||||
|
|
||||
|
Ja mówię tylko kilkoma językami (i to niezbyt dobrze 😅). Zatem oceniający są tymi, którzy mają [**moc zatwierdzania tłumaczeń**](contributing.md#translations){.internal-link target=_blank} dokumentacji. Bez nich nie byłoby dokumentacji w kilku innych językach. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
**Najlepsi Oceniający** 🕵️ przejrzeli więcej Pull Requestów, niż inni, zapewniając jakość kodu, dokumentacji, a zwłaszcza **tłumaczeń**. |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.top_reviewers %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">Liczba ocen: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
## Sponsorzy |
||||
|
|
||||
|
Oto **Sponsorzy**. 😎 |
||||
|
|
||||
|
Wspierają moją pracę nad **FastAPI** (i innymi), głównie poprzez <a href="https://github.com/sponsors/tiangolo" class="external-link" target="_blank">GitHub Sponsors</a>. |
||||
|
|
||||
|
{% if sponsors %} |
||||
|
|
||||
|
{% if sponsors.gold %} |
||||
|
|
||||
|
### Złoci Sponsorzy |
||||
|
|
||||
|
{% for sponsor in sponsors.gold -%} |
||||
|
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a> |
||||
|
{% endfor %} |
||||
|
{% endif %} |
||||
|
|
||||
|
{% if sponsors.silver %} |
||||
|
|
||||
|
### Srebrni Sponsorzy |
||||
|
|
||||
|
{% 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 %} |
||||
|
|
||||
|
{% if sponsors.bronze %} |
||||
|
|
||||
|
### Brązowi Sponsorzy |
||||
|
|
||||
|
{% for sponsor in sponsors.bronze -%} |
||||
|
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a> |
||||
|
{% endfor %} |
||||
|
{% endif %} |
||||
|
|
||||
|
{% endif %} |
||||
|
|
||||
|
### Indywidualni Sponsorzy |
||||
|
|
||||
|
{% if github_sponsors %} |
||||
|
{% for group in github_sponsors.sponsors %} |
||||
|
|
||||
|
<div class="user-list user-list-center"> |
||||
|
|
||||
|
{% for user in group %} |
||||
|
{% if user.login not in sponsors_badge.logins %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a></div> |
||||
|
|
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
{% endfor %} |
||||
|
{% endif %} |
||||
|
|
||||
|
## Techniczne szczegóły danych |
||||
|
|
||||
|
Głównym celem tej strony jest podkreślenie wysiłku społeczności w pomaganiu innym. |
||||
|
|
||||
|
Szczególnie włączając wysiłki, które są zwykle mniej widoczne, a w wielu przypadkach bardziej żmudne, tak jak pomaganie innym z pytaniami i ocenianie Pull Requestów z tłumaczeniami. |
||||
|
|
||||
|
Dane są obliczane każdego miesiąca, możesz przeczytać <a href="https://github.com/tiangolo/fastapi/blob/master/.github/actions/people/app/main.py" class="external-link" target="_blank">kod źródłowy tutaj</a>. |
||||
|
|
||||
|
Tutaj również podkreślam wkład od sponsorów. |
||||
|
|
||||
|
Zastrzegam sobie prawo do aktualizacji algorytmu, sekcji, progów itp. (na wszelki wypadek 🤷). |
@ -0,0 +1,84 @@ |
|||||
|
# FastAPI CLI |
||||
|
|
||||
|
**FastAPI CLI** é uma interface por linha de comando do `fastapi` que você pode usar para rodar sua app FastAPI, gerenciar seu projeto FastAPI e mais. |
||||
|
|
||||
|
Quando você instala o FastAPI (ex.: com `pip install fastapi`), isso inclui um pacote chamado `fastapi-cli`. Esse pacote disponibiliza o comando `fastapi` no terminal. |
||||
|
|
||||
|
Para rodar seu app FastAPI em desenvolvimento, você pode usar o comando `fastapi dev`: |
||||
|
|
||||
|
<div class="termy"> |
||||
|
|
||||
|
```console |
||||
|
$ <font color="#4E9A06">fastapi</font> dev <u style="text-decoration-style:single">main.py</u> |
||||
|
<font color="#3465A4">INFO </font> Using path <font color="#3465A4">main.py</font> |
||||
|
<font color="#3465A4">INFO </font> Resolved absolute path <font color="#75507B">/home/user/code/awesomeapp/</font><font color="#AD7FA8">main.py</font> |
||||
|
<font color="#3465A4">INFO </font> Searching for package file structure from directories with <font color="#3465A4">__init__.py</font> files |
||||
|
<font color="#3465A4">INFO </font> Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font> |
||||
|
|
||||
|
╭─ <font color="#8AE234"><b>Python module file</b></font> ─╮ |
||||
|
│ │ |
||||
|
│ 🐍 main.py │ |
||||
|
│ │ |
||||
|
╰──────────────────────╯ |
||||
|
|
||||
|
<font color="#3465A4">INFO </font> Importing module <font color="#4E9A06">main</font> |
||||
|
<font color="#3465A4">INFO </font> Found importable FastAPI app |
||||
|
|
||||
|
╭─ <font color="#8AE234"><b>Importable FastAPI app</b></font> ─╮ |
||||
|
│ │ |
||||
|
│ <span style="background-color:#272822"><font color="#FF4689">from</font></span><span style="background-color:#272822"><font color="#F8F8F2"> main </font></span><span style="background-color:#272822"><font color="#FF4689">import</font></span><span style="background-color:#272822"><font color="#F8F8F2"> app</font></span><span style="background-color:#272822"> </span> │ |
||||
|
│ │ |
||||
|
╰──────────────────────────╯ |
||||
|
|
||||
|
<font color="#3465A4">INFO </font> Using import string <font color="#8AE234"><b>main:app</b></font> |
||||
|
|
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">╭────────── FastAPI CLI - Development mode ───────────╮</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ Serving at: http://127.0.0.1:8000 │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ API docs: http://127.0.0.1:8000/docs │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ Running in development mode, for production use: │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ </font></span><span style="background-color:#C4A000"><font color="#555753"><b>fastapi run</b></font></span><span style="background-color:#C4A000"><font color="#2E3436"> │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">│ │</font></span> |
||||
|
<span style="background-color:#C4A000"><font color="#2E3436">╰─────────────────────────────────────────────────────╯</font></span> |
||||
|
|
||||
|
<font color="#4E9A06">INFO</font>: Will watch for changes in these directories: ['/home/user/code/awesomeapp'] |
||||
|
<font color="#4E9A06">INFO</font>: Uvicorn running on <b>http://127.0.0.1:8000</b> (Press CTRL+C to quit) |
||||
|
<font color="#4E9A06">INFO</font>: Started reloader process [<font color="#34E2E2"><b>2265862</b></font>] using <font color="#34E2E2"><b>WatchFiles</b></font> |
||||
|
<font color="#4E9A06">INFO</font>: Started server process [<font color="#06989A">2265873</font>] |
||||
|
<font color="#4E9A06">INFO</font>: Waiting for application startup. |
||||
|
<font color="#4E9A06">INFO</font>: Application startup complete. |
||||
|
``` |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
Aquele commando por linha de programa chamado `fastapi` é o **FastAPI CLI**. |
||||
|
|
||||
|
O FastAPI CLI recebe o caminho do seu programa Python, detecta automaticamente a variável com o FastAPI (comumente nomeada `app`) e como importá-la, e então a serve. |
||||
|
|
||||
|
Para produção você usaria `fastapi run` no lugar. 🚀 |
||||
|
|
||||
|
Internamente, **FastAPI CLI** usa <a href="https://www.uvicorn.org" class="external-link" target="_blank">Uvicorn</a>, um servidor ASGI de alta performance e pronto para produção. 😎 |
||||
|
|
||||
|
## `fastapi dev` |
||||
|
|
||||
|
Quando você roda `fastapi dev`, isso vai executar em modo de desenvolvimento. |
||||
|
|
||||
|
Por padrão, teremos o **recarregamento automático** ativo, então o programa irá recarregar o servidor automaticamente toda vez que você fizer mudanças no seu código. Isso usa muitos recursos e pode ser menos estável. Você deve apenas usá-lo em modo de desenvolvimento. |
||||
|
|
||||
|
O servidor de desenvolvimento escutará no endereço de IP `127.0.0.1` por padrão, este é o IP que sua máquina usa para se comunicar com ela mesma (`localhost`). |
||||
|
|
||||
|
## `fastapi run` |
||||
|
|
||||
|
Quando você rodar `fastapi run`, isso executará em modo de produção por padrão. |
||||
|
|
||||
|
Este modo terá **recarregamento automático desativado** por padrão. |
||||
|
|
||||
|
Isso irá escutar no endereço de IP `0.0.0.0`, o que significa todos os endereços IP disponíveis, dessa forma o programa estará acessível publicamente para qualquer um que consiga se comunicar com a máquina. Isso é como você normalmente roda em produção em um contêiner, por exemplo. |
||||
|
|
||||
|
Em muitos casos você pode ter (e deveria ter) um "proxy de saída" tratando HTTPS no topo, isso dependerá de como você fará o deploy da sua aplicação, seu provedor pode fazer isso pra você ou talvez seja necessário fazer você mesmo. |
||||
|
|
||||
|
!!! tip |
||||
|
Você pode aprender mais sobre em [documentação de deployment](deployment/index.md){.internal-link target=_blank}. |
@ -0,0 +1,3 @@ |
|||||
|
# О проекте |
||||
|
|
||||
|
FastAPI: внутреннее устройство, повлиявшие технологии и всё такое прочее. 🤓 |
@ -0,0 +1,33 @@ |
|||||
|
# Gelişmiş Kullanıcı Rehberi |
||||
|
|
||||
|
## Ek Özellikler |
||||
|
|
||||
|
[Tutorial - User Guide](../tutorial/index.md){.internal-link target=_blank} sayfası **FastAPI**'ın tüm ana özelliklerini tanıtmaya yetecektir. |
||||
|
|
||||
|
İlerleyen bölümlerde diğer seçenekler, konfigürasyonlar ve ek özellikleri göreceğiz. |
||||
|
|
||||
|
!!! tip "İpucu" |
||||
|
Sonraki bölümler **mutlaka "gelişmiş" olmak zorunda değildir**. |
||||
|
|
||||
|
Kullanım şeklinize bağlı olarak, çözümünüz bu bölümlerden birinde olabilir. |
||||
|
|
||||
|
## Önce Öğreticiyi Okuyun |
||||
|
|
||||
|
[Tutorial - User Guide](../tutorial/index.md){.internal-link target=_blank} sayfasındaki bilgilerle **FastAPI**'nın çoğu özelliğini kullanabilirsiniz. |
||||
|
|
||||
|
Sonraki bölümler bu sayfayı okuduğunuzu ve bu ana fikirleri bildiğinizi varsayarak hazırlanmıştır. |
||||
|
|
||||
|
## Diğer Kurslar |
||||
|
|
||||
|
[Tutorial - User Guide](../tutorial/index.md){.internal-link target=_blank} sayfası ve bu **Gelişmiş Kullanıcı Rehberi**, öğretici bir kılavuz (bir kitap gibi) şeklinde yazılmıştır ve **FastAPI'ı öğrenmek** için yeterli olsa da, ek kurslarla desteklemek isteyebilirsiniz. |
||||
|
|
||||
|
Belki de öğrenme tarzınıza daha iyi uyduğu için başka kursları tercih edebilirsiniz. |
||||
|
|
||||
|
Bazı kurs sağlayıcıları ✨ [**FastAPI destekçileridir**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨, bu FastAPI ve **ekosisteminin** sürekli ve sağlıklı bir şekilde **gelişmesini** sağlar. |
||||
|
|
||||
|
Ayrıca, size **iyi bir öğrenme deneyimi** sağlamakla kalmayıp, **iyi ve sağlıklı bir framework** olan FastAPI'a ve ve **topluluğuna** (yani size) olan gerçek bağlılıklarını gösterir. |
||||
|
|
||||
|
Onların kurslarını denemek isteyebilirsiniz: |
||||
|
|
||||
|
* <a href="https://training.talkpython.fm/fastapi-courses" class="external-link" target="_blank">Talk Python Training</a> |
||||
|
* <a href="https://testdriven.io/courses/tdd-fastapi/" class="external-link" target="_blank">Test-Driven Development</a> |
@ -0,0 +1,16 @@ |
|||||
|
# Gelişmiş Güvenlik |
||||
|
|
||||
|
## Ek Özellikler |
||||
|
|
||||
|
[Tutorial - User Guide: Security](../../tutorial/security/index.md){.internal-link target=_blank} sayfasında ele alınanların dışında güvenlikle ilgili bazı ek özellikler vardır. |
||||
|
|
||||
|
!!! tip "İpucu" |
||||
|
Sonraki bölümler **mutlaka "gelişmiş" olmak zorunda değildir**. |
||||
|
|
||||
|
Kullanım şeklinize bağlı olarak, çözümünüz bu bölümlerden birinde olabilir. |
||||
|
|
||||
|
## Önce Öğreticiyi Okuyun |
||||
|
|
||||
|
Sonraki bölümler [Tutorial - User Guide: Security](../../tutorial/security/index.md){.internal-link target=_blank} sayfasını okuduğunuzu varsayarak hazırlanmıştır. |
||||
|
|
||||
|
Bu bölümler aynı kavramlara dayanır, ancak bazı ek işlevsellikler sağlar. |
@ -0,0 +1,12 @@ |
|||||
|
# WebSockets'i Test Etmek |
||||
|
|
||||
|
WebSockets testi yapmak için `TestClient`'ı kullanabilirsiniz. |
||||
|
|
||||
|
Bu işlem için, `TestClient`'ı bir `with` ifadesinde kullanarak WebSocket'e bağlanabilirsiniz: |
||||
|
|
||||
|
```Python hl_lines="27-31" |
||||
|
{!../../../docs_src/app_testing/tutorial002.py!} |
||||
|
``` |
||||
|
|
||||
|
!!! note "Not" |
||||
|
Daha fazla detay için Starlette'in <a href="https://www.starlette.io/staticfiles/" class="external-link" target="_blank">Websockets'i Test Etmek</a> dokümantasyonunu inceleyin. |
@ -0,0 +1,37 @@ |
|||||
|
# WSGI - Flask, Django ve Daha Fazlasını FastAPI ile Kullanma |
||||
|
|
||||
|
WSGI uygulamalarını [Sub Applications - Mounts](sub-applications.md){.internal-link target=_blank}, [Behind a Proxy](behind-a-proxy.md){.internal-link target=_blank} bölümlerinde gördüğünüz gibi bağlayabilirsiniz. |
||||
|
|
||||
|
Bunun için `WSGIMiddleware` ile Flask, Django vb. WSGI uygulamanızı sarmalayabilir ve FastAPI'ya bağlayabilirsiniz. |
||||
|
|
||||
|
## `WSGIMiddleware` Kullanımı |
||||
|
|
||||
|
`WSGIMiddleware`'ı projenize dahil edin. |
||||
|
|
||||
|
Ardından WSGI (örneğin Flask) uygulamanızı middleware ile sarmalayın. |
||||
|
|
||||
|
Son olarak da bir yol altında bağlama işlemini gerçekleştirin. |
||||
|
|
||||
|
```Python hl_lines="2-3 23" |
||||
|
{!../../../docs_src/wsgi/tutorial001.py!} |
||||
|
``` |
||||
|
|
||||
|
## Kontrol Edelim |
||||
|
|
||||
|
Artık `/v1/` yolunun altındaki her istek Flask uygulaması tarafından işlenecektir. |
||||
|
|
||||
|
Geri kalanı ise **FastAPI** tarafından işlenecektir. |
||||
|
|
||||
|
Eğer uygulamanızı çalıştırıp <a href="http://localhost:8000/v1/" class="external-link" target="_blank">http://localhost:8000/v1/</a> adresine giderseniz, Flask'tan gelen yanıtı göreceksiniz: |
||||
|
|
||||
|
```txt |
||||
|
Hello, World from Flask! |
||||
|
``` |
||||
|
|
||||
|
Eğer <a href="http://localhost:8000/v2/" class="external-link" target="_blank">http://localhost:8000/v2/</a> adresine giderseniz, FastAPI'dan gelen yanıtı göreceksiniz: |
||||
|
|
||||
|
```JSON |
||||
|
{ |
||||
|
"message": "Hello World" |
||||
|
} |
||||
|
``` |
@ -0,0 +1,17 @@ |
|||||
|
# FastAPI Uygulamasını Bulut Sağlayıcılar Üzerinde Yayınlama |
||||
|
|
||||
|
FastAPI uygulamasını yayınlamak için hemen hemen **herhangi bir bulut sağlayıcıyı** kullanabilirsiniz. |
||||
|
|
||||
|
Büyük bulut sağlayıcıların çoğu FastAPI uygulamasını yayınlamak için kılavuzlara sahiptir. |
||||
|
|
||||
|
## Bulut Sağlayıcılar - Sponsorlar |
||||
|
|
||||
|
Bazı bulut sağlayıcılar ✨ [**FastAPI destekçileridir**](../help-fastapi.md#sponsor-the-author){.internal-link target=_blank} ✨, bu FastAPI ve **ekosisteminin** sürekli ve sağlıklı bir şekilde **gelişmesini** sağlar. |
||||
|
|
||||
|
Ayrıca, size **iyi servisler** sağlamakla kalmayıp, **iyi ve sağlıklı bir framework** olan FastAPI'a bağlılıklarını gösterir. |
||||
|
|
||||
|
Bu hizmetleri denemek ve kılavuzlarını incelemek isteyebilirsiniz: |
||||
|
|
||||
|
* <a href="https://docs.platform.sh/languages/python.html?utm_source=fastapi-signup&utm_medium=banner&utm_campaign=FastAPI-signup-June-2023" class="external-link" target="_blank">Platform.sh</a> |
||||
|
* <a href="https://docs.porter.run/language-specific-guides/fastapi" class="external-link" target="_blank">Porter</a> |
||||
|
* <a href="https://docs.withcoherence.com/docs/configuration/frameworks?utm_medium=advertising&utm_source=fastapi&utm_campaign=banner%20january%2024#fast-api-example" class="external-link" target="_blank">Coherence</a> |
@ -0,0 +1,21 @@ |
|||||
|
# Deployment (Yayınlama) |
||||
|
|
||||
|
**FastAPI** uygulamasını deploy etmek oldukça kolaydır. |
||||
|
|
||||
|
## Deployment Ne Anlama Gelir? |
||||
|
|
||||
|
Bir uygulamayı **deploy** etmek (yayınlamak), uygulamayı **kullanıcılara erişilebilir hale getirmek** için gerekli adımları gerçekleştirmek anlamına gelir. |
||||
|
|
||||
|
Bir **Web API** için bu süreç normalde uygulamayı **uzak bir makineye** yerleştirmeyi, iyi performans, kararlılık vb. özellikler sağlayan bir **sunucu programı** ile **kullanıcılarınızın** uygulamaya etkili ve kesintisiz bir şekilde **erişebilmesini** kapsar. |
||||
|
|
||||
|
Bu, kodu sürekli olarak değiştirdiğiniz, hata alıp hata giderdiğiniz, geliştirme sunucusunu durdurup yeniden başlattığınız vb. **geliştirme** aşamalarının tam tersidir. |
||||
|
|
||||
|
## Deployment Stratejileri |
||||
|
|
||||
|
Kullanım durumunuza ve kullandığınız araçlara bağlı olarak bir kaç farklı yol izleyebilirsiniz. |
||||
|
|
||||
|
Bir dizi araç kombinasyonunu kullanarak kendiniz **bir sunucu yayınlayabilirsiniz**, yayınlama sürecinin bir kısmını sizin için gerçekleştiren bir **bulut hizmeti** veya diğer olası seçenekleri kullanabilirsiniz. |
||||
|
|
||||
|
**FastAPI** uygulamasını yayınlarken aklınızda bulundurmanız gereken ana kavramlardan bazılarını size göstereceğim (ancak bunların çoğu diğer web uygulamaları için de geçerlidir). |
||||
|
|
||||
|
Sonraki bölümlerde akılda tutulması gereken diğer ayrıntıları ve yayınlama tekniklerinden bazılarını göreceksiniz. ✨ |
@ -0,0 +1,39 @@ |
|||||
|
# Genel - Nasıl Yapılır - Tarifler |
||||
|
|
||||
|
Bu sayfada genel ve sıkça sorulan sorular için dokümantasyonun diğer sayfalarına yönlendirmeler bulunmaktadır. |
||||
|
|
||||
|
## Veri Filtreleme - Güvenlik |
||||
|
|
||||
|
Döndürmeniz gereken veriden fazlasını döndürmediğinizden emin olmak için, [Tutorial - Response Model - Return Type](../tutorial/response-model.md){.internal-link target=_blank} sayfasını okuyun. |
||||
|
|
||||
|
## Dokümantasyon Etiketleri - OpenAPI |
||||
|
|
||||
|
*Yol operasyonlarınıza* etiketler ekleyerek dokümantasyon arayüzünde gruplar halinde görünmesini sağlamak için, [Tutorial - Path Operation Configurations - Tags](../tutorial/path-operation-configuration.md#tags){.internal-link target=_blank} sayfasını okuyun. |
||||
|
|
||||
|
## Dokümantasyon Özeti ve Açıklaması - OpenAPI |
||||
|
|
||||
|
*Yol operasyonlarınıza* özet ve açıklama ekleyip dokümantasyon arayüzünde görünmesini sağlamak için, [Tutorial - Path Operation Configurations - Summary and Description](../tutorial/path-operation-configuration.md#summary-and-description){.internal-link target=_blank} sayfasını okuyun. |
||||
|
|
||||
|
## Yanıt Açıklaması Dokümantasyonu - OpenAPI |
||||
|
|
||||
|
Dokümantasyon arayüzünde yer alan yanıt açıklamasını tanımlamak için, [Tutorial - Path Operation Configurations - Response description](../tutorial/path-operation-configuration.md#response-description){.internal-link target=_blank} sayfasını okuyun. |
||||
|
|
||||
|
## *Yol Operasyonunu* Kullanımdan Kaldırma - OpenAPI |
||||
|
|
||||
|
Bir *yol işlemi*ni kullanımdan kaldırmak ve bunu dokümantasyon arayüzünde göstermek için, [Tutorial - Path Operation Configurations - Deprecation](../tutorial/path-operation-configuration.md#deprecate-a-path-operation){.internal-link target=_blank} sayfasını okuyun. |
||||
|
|
||||
|
## Herhangi Bir Veriyi JSON Uyumlu Hale Getirme |
||||
|
|
||||
|
Herhangi bir veriyi JSON uyumlu hale getirmek için, [Tutorial - JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank} sayfasını okuyun. |
||||
|
|
||||
|
## OpenAPI Meta Verileri - Dokümantasyon |
||||
|
|
||||
|
OpenAPI şemanıza lisans, sürüm, iletişim vb. meta veriler eklemek için, [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md){.internal-link target=_blank} sayfasını okuyun. |
||||
|
|
||||
|
## OpenAPI Bağlantı Özelleştirme |
||||
|
|
||||
|
OpenAPI bağlantısını özelleştirmek (veya kaldırmak) için, [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md#openapi-url){.internal-link target=_blank} sayfasını okuyun. |
||||
|
|
||||
|
## OpenAPI Dokümantasyon Bağlantıları |
||||
|
|
||||
|
Dokümantasyonu arayüzünde kullanılan bağlantıları güncellemek için, [Tutorial - Metadata and Docs URLs](../tutorial/metadata.md#docs-urls){.internal-link target=_blank} sayfasını okuyun. |
@ -0,0 +1,97 @@ |
|||||
|
# Çerez (Cookie) Parametreleri |
||||
|
|
||||
|
`Query` (Sorgu) ve `Path` (Yol) parametrelerini tanımladığınız şekilde çerez parametreleri tanımlayabilirsiniz. |
||||
|
|
||||
|
## Import `Cookie` |
||||
|
|
||||
|
Öncelikle, `Cookie`'yi projenize dahil edin: |
||||
|
|
||||
|
=== "Python 3.10+" |
||||
|
|
||||
|
```Python hl_lines="3" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} |
||||
|
``` |
||||
|
|
||||
|
=== "Python 3.9+" |
||||
|
|
||||
|
```Python hl_lines="3" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} |
||||
|
``` |
||||
|
|
||||
|
=== "Python 3.8+" |
||||
|
|
||||
|
```Python hl_lines="3" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001_an.py!} |
||||
|
``` |
||||
|
|
||||
|
=== "Python 3.10+ non-Annotated" |
||||
|
|
||||
|
!!! tip "İpucu" |
||||
|
Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın. |
||||
|
|
||||
|
```Python hl_lines="1" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} |
||||
|
``` |
||||
|
|
||||
|
=== "Python 3.8+ non-Annotated" |
||||
|
|
||||
|
!!! tip "İpucu" |
||||
|
Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın. |
||||
|
|
||||
|
```Python hl_lines="3" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001.py!} |
||||
|
``` |
||||
|
|
||||
|
## `Cookie` Parametrelerini Tanımlayın |
||||
|
|
||||
|
Çerez parametrelerini `Path` veya `Query` tanımlaması yapar gibi tanımlayın. |
||||
|
|
||||
|
İlk değer varsayılan değerdir; tüm ekstra doğrulama veya belirteç parametrelerini kullanabilirsiniz: |
||||
|
|
||||
|
=== "Python 3.10+" |
||||
|
|
||||
|
```Python hl_lines="9" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} |
||||
|
``` |
||||
|
|
||||
|
=== "Python 3.9+" |
||||
|
|
||||
|
```Python hl_lines="9" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} |
||||
|
``` |
||||
|
|
||||
|
=== "Python 3.8+" |
||||
|
|
||||
|
```Python hl_lines="10" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001_an.py!} |
||||
|
``` |
||||
|
|
||||
|
=== "Python 3.10+ non-Annotated" |
||||
|
|
||||
|
!!! tip "İpucu" |
||||
|
Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın. |
||||
|
|
||||
|
```Python hl_lines="7" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001_py310.py!} |
||||
|
``` |
||||
|
|
||||
|
=== "Python 3.8+ non-Annotated" |
||||
|
|
||||
|
!!! tip "İpucu" |
||||
|
Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın. |
||||
|
|
||||
|
```Python hl_lines="9" |
||||
|
{!> ../../../docs_src/cookie_params/tutorial001.py!} |
||||
|
``` |
||||
|
|
||||
|
!!! note "Teknik Detaylar" |
||||
|
`Cookie` sınıfı `Path` ve `Query` sınıflarının kardeşidir. Diğerleri gibi `Param` sınıfını miras alan bir sınıftır. |
||||
|
|
||||
|
Ancak `fastapi`'dan projenize dahil ettiğiniz `Query`, `Path`, `Cookie` ve diğerleri aslında özel sınıflar döndüren birer fonksiyondur. |
||||
|
|
||||
|
!!! info "Bilgi" |
||||
|
Çerez tanımlamak için `Cookie` sınıfını kullanmanız gerekmektedir, aksi taktirde parametreler sorgu parametreleri olarak yorumlanır. |
||||
|
|
||||
|
## Özet |
||||
|
|
||||
|
Çerez tanımlamalarını `Cookie` sınıfını kullanarak `Query` ve `Path` tanımlar gibi tanımlayın. |
@ -0,0 +1,39 @@ |
|||||
|
# Statik Dosyalar |
||||
|
|
||||
|
`StaticFiles`'ı kullanarak statik dosyaları bir yol altında sunabilirsiniz. |
||||
|
|
||||
|
## `StaticFiles` Kullanımı |
||||
|
|
||||
|
* `StaticFiles` sınıfını projenize dahil edin. |
||||
|
* Bir `StaticFiles()` örneğini belirli bir yola bağlayın. |
||||
|
|
||||
|
```Python hl_lines="2 6" |
||||
|
{!../../../docs_src/static_files/tutorial001.py!} |
||||
|
``` |
||||
|
|
||||
|
!!! note "Teknik Detaylar" |
||||
|
Projenize dahil etmek için `from starlette.staticfiles import StaticFiles` kullanabilirsiniz. |
||||
|
|
||||
|
**FastAPI**, geliştiricilere kolaylık sağlamak amacıyla `starlette.staticfiles`'ı `fastapi.staticfiles` olarak sağlar. Ancak `StaticFiles` sınıfı aslında doğrudan Starlette'den gelir. |
||||
|
|
||||
|
### Bağlama (Mounting) Nedir? |
||||
|
|
||||
|
"Bağlamak", belirli bir yola tamamen "bağımsız" bir uygulama eklemek anlamına gelir ve ardından tüm alt yollara gelen istekler bu uygulama tarafından işlenir. |
||||
|
|
||||
|
Bu, bir `APIRouter` kullanmaktan farklıdır çünkü bağlanmış bir uygulama tamamen bağımsızdır. Ana uygulamanızın OpenAPI ve dokümanlar, bağlanmış uygulamadan hiçbir şey içermez, vb. |
||||
|
|
||||
|
[Advanced User Guide](../advanced/index.md){.internal-link target=_blank} bölümünde daha fazla bilgi edinebilirsiniz. |
||||
|
|
||||
|
## Detaylar |
||||
|
|
||||
|
`"/static"` ifadesi, bu "alt uygulamanın" "bağlanacağı" alt yolu belirtir. Bu nedenle, `"/static"` ile başlayan her yol, bu uygulama tarafından işlenir. |
||||
|
|
||||
|
`directory="static"` ifadesi, statik dosyalarınızı içeren dizinin adını belirtir. |
||||
|
|
||||
|
`name="static"` ifadesi, alt uygulamanın **FastAPI** tarafından kullanılacak ismini belirtir. |
||||
|
|
||||
|
Bu parametrelerin hepsi "`static`"den farklı olabilir, bunları kendi uygulamanızın ihtiyaçlarına göre belirleyebilirsiniz. |
||||
|
|
||||
|
## Daha Fazla Bilgi |
||||
|
|
||||
|
Daha fazla detay ve seçenek için <a href="https://www.starlette.io/staticfiles/" class="external-link" target="_blank">Starlette'in Statik Dosyalar hakkındaki dokümantasyonunu</a> incelleyin. |
@ -0,0 +1,236 @@ |
|||||
|
--- |
||||
|
hide: |
||||
|
- navigation |
||||
|
--- |
||||
|
|
||||
|
# FastAPI 社群 |
||||
|
|
||||
|
FastAPI 有一個非常棒的社群,歡迎來自不同背景的朋友參與。 |
||||
|
|
||||
|
## 作者 |
||||
|
|
||||
|
嘿! 👋 |
||||
|
|
||||
|
關於我: |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.maintainers %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">解答問題: {{ user.answers }}</div><div class="count">Pull Requests: {{ user.prs }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
我是 **FastAPI** 的作者。你可以在[幫助 FastAPI - 獲得幫助 - 與作者聯繫](help-fastapi.md#connect-with-the-author){.internal-link target=_blank} 中閱讀更多相關資訊。 |
||||
|
|
||||
|
...但在這裡,我想向你介紹這個社群。 |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
**FastAPI** 獲得了許多社群的大力支持。我想特別表揚他們的貢獻。 |
||||
|
|
||||
|
這些人包括: |
||||
|
|
||||
|
* [在 GitHub 中幫助他人解答問題](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}。 |
||||
|
* [建立 Pull Requests](help-fastapi.md#create-a-pull-request){.internal-link target=_blank}。 |
||||
|
* 審查 Pull Requests,[尤其是翻譯方面的貢獻](contributing.md#translations){.internal-link target=_blank}。 |
||||
|
|
||||
|
讓我們為他們熱烈鼓掌。 👏 🙇 |
||||
|
|
||||
|
## FastAPI 專家 |
||||
|
|
||||
|
這些是在 [GitHub 中幫助其他人解決問題最多的用戶](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}。 🙇 |
||||
|
|
||||
|
他們透過幫助其他人,證明了自己是 **FastAPI 專家**。 ✨ |
||||
|
|
||||
|
!!! 提示 |
||||
|
你也可以成為官方的 FastAPI 專家! |
||||
|
|
||||
|
只需要在 [GitHub 中幫助他人解答問題](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}。 🤓 |
||||
|
|
||||
|
你可以查看這些期間的 **FastAPI 專家**: |
||||
|
|
||||
|
* [上個月](#fastapi-experts-last-month) 🤓 |
||||
|
* [過去 3 個月](#fastapi-experts-3-months) 😎 |
||||
|
* [過去 6 個月](#fastapi-experts-6-months) 🧐 |
||||
|
* [過去 1 年](#fastapi-experts-1-year) 🧑🔬 |
||||
|
* [**所有時間**](#fastapi-experts-all-time) 🧙 |
||||
|
|
||||
|
### FastAPI 專家 - 上個月 |
||||
|
|
||||
|
上個月在 [GitHub 中幫助他人解決問題最多的](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}用戶。 🤓 |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.last_month_experts[:10] %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">回答問題數: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
### FastAPI 專家 - 過去 3 個月 |
||||
|
|
||||
|
過去三個月在 [GitHub 中幫助他人解決問題最多的](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}用戶。 😎 |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.three_months_experts[:10] %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">回答問題數: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
### FastAPI 專家 - 過去 6 個月 |
||||
|
|
||||
|
過去六個月在 [GitHub 中幫助他人解決問題最多的](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}用戶。 🧐 |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.six_months_experts[:10] %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">回答問題數: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
### FastAPI 專家 - 過去一年 |
||||
|
|
||||
|
過去一年在 [GitHub 中幫助他人解決最多問題的](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}用戶。 🧑🔬 |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.one_year_experts[:20] %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">回答問題數: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
### FastAPI 專家 - 全部時間 |
||||
|
|
||||
|
以下是全部時間的 **FastAPI 專家**。 🤓🤯 |
||||
|
|
||||
|
過去在 [GitHub 中幫助他人解決問題最多的](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}用戶。 🧙 |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.experts[:50] %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">回答問題數: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
## 主要貢獻者 |
||||
|
|
||||
|
以下是**主要貢獻者**。 👷 |
||||
|
|
||||
|
這些用戶[建立了最多已被**合併**的 Pull Requests](help-fastapi.md#create-a-pull-request){.internal-link target=_blank}。 |
||||
|
|
||||
|
他們貢獻了原始碼、文件和翻譯等。 📦 |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.top_contributors[:50] %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">Pull Requests: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
還有許多其他的貢獻者(超過一百位),你可以在 <a href="https://github.com/tiangolo/fastapi/graphs/contributors" class="external-link" target="_blank">FastAPI GitHub 貢獻者頁面</a>查看。 👷 |
||||
|
|
||||
|
## 主要翻譯審核者 |
||||
|
|
||||
|
以下是 **主要翻譯審核者**。 🕵️ |
||||
|
|
||||
|
我只會講幾種語言(而且不是很流利 😅),所以審核者[**擁有批准翻譯**](contributing.md#translations){.internal-link target=_blank}文件的權限。沒有他們,就不會有多語言版本的文件。 |
||||
|
|
||||
|
{% if people %} |
||||
|
<div class="user-list user-list-center"> |
||||
|
{% for user in people.top_translations_reviewers[:50] %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a> <div class="count">Reviews: {{ user.count }}</div></div> |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
## 贊助者 |
||||
|
|
||||
|
以下是**贊助者**。 😎 |
||||
|
|
||||
|
他們主要透過 <a href="https://github.com/sponsors/tiangolo" class="external-link" target="_blank">GitHub Sponsors</a> 支持我在 **FastAPI**(以及其他項目)上的工作。 |
||||
|
|
||||
|
{% if sponsors %} |
||||
|
|
||||
|
{% if sponsors.gold %} |
||||
|
|
||||
|
### 金牌贊助商 |
||||
|
|
||||
|
{% for sponsor in sponsors.gold -%} |
||||
|
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a> |
||||
|
{% endfor %} |
||||
|
{% endif %} |
||||
|
|
||||
|
{% if sponsors.silver %} |
||||
|
|
||||
|
### 銀牌贊助商 |
||||
|
|
||||
|
{% 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 %} |
||||
|
|
||||
|
{% if sponsors.bronze %} |
||||
|
|
||||
|
### 銅牌贊助商 |
||||
|
|
||||
|
{% for sponsor in sponsors.bronze -%} |
||||
|
<a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a> |
||||
|
{% endfor %} |
||||
|
{% endif %} |
||||
|
|
||||
|
{% endif %} |
||||
|
|
||||
|
### 個人贊助商 |
||||
|
|
||||
|
{% if github_sponsors %} |
||||
|
{% for group in github_sponsors.sponsors %} |
||||
|
|
||||
|
<div class="user-list user-list-center"> |
||||
|
|
||||
|
{% for user in group %} |
||||
|
{% if user.login not in sponsors_badge.logins %} |
||||
|
|
||||
|
<div class="user"><a href="{{ user.url }}" target="_blank"><div class="avatar-wrapper"><img src="{{ user.avatarUrl }}"/></div><div class="title">@{{ user.login }}</div></a></div> |
||||
|
|
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
{% endfor %} |
||||
|
{% endif %} |
||||
|
|
||||
|
## 關於數據 - 技術細節 |
||||
|
|
||||
|
這個頁面的主要目的是突顯社群幫助他人所做的努力 |
||||
|
|
||||
|
特別是那些通常不太顯眼但往往更加艱辛的工作,例如幫助他人解答問題和審查包含翻譯的 Pull Requests。 |
||||
|
|
||||
|
這些數據每月計算一次,你可以在這查看<a href="https://github.com/tiangolo/fastapi/blob/master/.github/actions/people/app/main.py" class="external-link" target="_blank">原始碼</a>。 |
||||
|
|
||||
|
此外,我也特別表揚贊助者的貢獻。 |
||||
|
|
||||
|
我也保留更新演算法、章節、門檻值等的權利(以防萬一 🤷)。 |
@ -20,10 +20,8 @@ def client(): |
|||||
def test_swagger_ui_html(client: TestClient): |
def test_swagger_ui_html(client: TestClient): |
||||
response = client.get("/docs") |
response = client.get("/docs") |
||||
assert response.status_code == 200, response.text |
assert response.status_code == 200, response.text |
||||
assert ( |
assert "https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js" in response.text |
||||
"https://unpkg.com/[email protected]/swagger-ui-bundle.js" in response.text |
assert "https://unpkg.com/swagger-ui-dist@5/swagger-ui.css" in response.text |
||||
) |
|
||||
assert "https://unpkg.com/[email protected]/swagger-ui.css" in response.text |
|
||||
|
|
||||
|
|
||||
def test_swagger_ui_oauth2_redirect_html(client: TestClient): |
def test_swagger_ui_oauth2_redirect_html(client: TestClient): |
||||
|
Loading…
Reference in new issue