|
|
ff1cd93 |
# For translations, check docs/*/docs/index.md
|
|
|
0fd1519 |
# Note that there are many other localized versions of the documentation
|
|
|
0fd1519 |
# *present*, but untranslated.
|
|
|
44d6223 |
%global sum_en FastAPI framework
|
|
|
44d6223 |
%global sum_es FastAPI framework
|
|
|
44d6223 |
%global sum_ja FastAPI framework
|
|
|
03855a4 |
%global sum_ko FastAPI 프레임워크
|
|
|
1dc475a |
%global sum_pl FastAPI to szybki
|
|
|
44d6223 |
%global sum_pt Framework FastAPI
|
|
|
79dc1b0 |
%global sum_tr FastAPI framework
|
|
|
44d6223 |
%global sum_zh FastAPI 框架
|
|
|
44d6223 |
|
|
|
f41ab0b |
Name: python-fastapi
|
|
|
e356ac9 |
Version: 0.78.0
|
|
|
1d4f7c9 |
Release: %autorelease
|
|
|
44d6223 |
Summary: %{sum_en}
|
|
|
9449886 |
|
|
|
9449886 |
License: MIT
|
|
|
f41ab0b |
URL: https://github.com/tiangolo/fastapi
|
|
|
f41ab0b |
Source0: %{url}/archive/%{version}/fastapi-%{version}.tar.gz
|
|
|
9449886 |
BuildArch: noarch
|
|
|
9449886 |
|
|
|
1dc475a |
# Fix sql_app_py39 and py310 tests
|
|
|
1dc475a |
# https://github.com/tiangolo/fastapi/pull/4409
|
|
|
1dc475a |
Patch: %{url}/pull/4409.patch
|
|
|
5c965b7 |
|
|
|
9449886 |
BuildRequires: python3-devel
|
|
|
44d6223 |
|
|
|
a4fe319 |
Obsoletes: python-fastapi-doc < 0.68.1-6
|
|
|
4a4e0b8 |
|
|
|
44d6223 |
Summary(en): %{sum_en}
|
|
|
fdbe48f |
Summary(es): %{sum_es}
|
|
|
44d6223 |
Summary(ja): %{sum_ja}
|
|
|
44d6223 |
Summary(ko): %{sum_ko}
|
|
|
1dc475a |
Summary(pl): %{sum_pl}
|
|
|
44d6223 |
Summary(pt): %{sum_pt}
|
|
|
79dc1b0 |
Summary(tr): %{sum_tr}
|
|
|
44d6223 |
Summary(zh): %{sum_zh}
|
|
|
44d6223 |
|
|
|
44d6223 |
%global common_description_en %{expand:
|
|
|
44d6223 |
FastAPI is a modern, fast (high-performance), web framework for building APIs
|
|
|
44d6223 |
with Python 3.6+ based on standard Python type hints.
|
|
|
44d6223 |
|
|
|
44d6223 |
The key features are:
|
|
|
44d6223 |
|
|
|
44d6223 |
• Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette
|
|
|
44d6223 |
and Pydantic). One of the fastest Python frameworks available.
|
|
|
44d6223 |
|
|
|
44d6223 |
• Fast to code: Increase the speed to develop features by about 200% to 300%.*
|
|
|
44d6223 |
• Fewer bugs: Reduce about 40% of human (developer) induced errors.*
|
|
|
44d6223 |
• Intuitive: Great editor support. Completion everywhere. Less time
|
|
|
44d6223 |
debugging.
|
|
|
44d6223 |
• Easy: Designed to be easy to use and learn. Less time reading docs.
|
|
|
44d6223 |
• Short: Minimize code duplication. Multiple features from each parameter
|
|
|
44d6223 |
declaration. Fewer bugs.
|
|
|
44d6223 |
• Robust: Get production-ready code. With automatic interactive
|
|
|
44d6223 |
documentation.
|
|
|
44d6223 |
• Standards-based: Based on (and fully compatible with) the open standards
|
|
|
44d6223 |
for APIs: OpenAPI (previously known as Swagger) and JSON Schema.
|
|
|
44d6223 |
|
|
|
44d6223 |
* estimation based on tests on an internal development team, building production
|
|
|
44d6223 |
applications.}
|
|
|
44d6223 |
%global common_description_es %{expand:
|
|
|
44d6223 |
FastAPI es un web framework moderno y rápido (de alto rendimiento) para
|
|
|
44d6223 |
construir APIs con Python 3.6+ basado en las anotaciones de tipos estándar de
|
|
|
44d6223 |
Python.
|
|
|
44d6223 |
|
|
|
44d6223 |
Sus características principales son:
|
|
|
44d6223 |
|
|
|
44d6223 |
• Rapidez: Alto rendimiento, a la par con NodeJS y Go (gracias a
|
|
|
44d6223 |
Starlette y Pydantic). Uno de los frameworks de Python más rápidos.
|
|
|
44d6223 |
|
|
|
44d6223 |
• Rápido de programar: Incrementa la velocidad de desarrollo entre 200% y
|
|
|
44d6223 |
300%.*
|
|
|
44d6223 |
• Menos errores: Reduce los errores humanos (de programador) aproximadamente
|
|
|
44d6223 |
un 40%.*
|
|
|
44d6223 |
• Intuitivo: Gran soporte en los editores con auto completado en todas
|
|
|
44d6223 |
partes. Gasta menos tiempo debugging.
|
|
|
44d6223 |
• Fácil: Está diseñado para ser fácil de usar y aprender. Gastando menos
|
|
|
44d6223 |
tiempo leyendo documentación.
|
|
|
44d6223 |
• Corto: Minimiza la duplicación de código. Múltiples funcionalidades con
|
|
|
44d6223 |
cada declaración de parámetros. Menos errores.
|
|
|
44d6223 |
• Robusto: Crea código listo para producción con documentación automática
|
|
|
44d6223 |
interactiva.
|
|
|
44d6223 |
• Basado en estándares: Basado y totalmente compatible con los estándares
|
|
|
44d6223 |
abiertos para APIs: OpenAPI (conocido previamente como Swagger) y JSON
|
|
|
44d6223 |
Schema.
|
|
|
44d6223 |
|
|
|
44d6223 |
* Esta estimación está basada en pruebas con un equipo de desarrollo interno
|
|
|
44d6223 |
contruyendo aplicaciones listas para producción.}
|
|
|
44d6223 |
%global common_description_ja %{expand:
|
|
|
44d6223 |
FastAPI は、Pythonの標準である型ヒントに基づいてPython 3.6 以降でAPI
|
|
|
44d6223 |
を構築するための、モダンで、高速(高パフォーマンス)な、Web フレームワークです。
|
|
|
44d6223 |
|
|
|
44d6223 |
主な特徴:
|
|
|
44d6223 |
|
|
|
44d6223 |
- 高速: NodeJS や Go 並みのとても高いパフォーマンス (Starlette と Pydantic
|
|
|
44d6223 |
のおかげです)。最も高速な Python フレームワークの一つです。
|
|
|
44d6223 |
|
|
|
44d6223 |
- 高速なコーディング: 開発速度を約 200%~300%向上させます。 *
|
|
|
44d6223 |
- 少ないバグ: 開発者起因のヒューマンエラーを約 40%削減します。 *
|
|
|
44d6223 |
- 直感的: 素晴らしいエディタのサポートや オートコンプリート。
|
|
|
44d6223 |
デバッグ時間を削減します。
|
|
|
44d6223 |
- 簡単: 簡単に利用、習得できるようにデザインされています。
|
|
|
44d6223 |
ドキュメントを読む時間を削減します。
|
|
|
44d6223 |
- 短い: コードの重複を最小限にしています。
|
|
|
44d6223 |
各パラメータからの複数の機能。少ないバグ。
|
|
|
44d6223 |
- 堅牢性:
|
|
|
44d6223 |
自動対話ドキュメントを使用して、本番環境で使用できるコードを取得します。
|
|
|
44d6223 |
- Standards-based: API
|
|
|
44d6223 |
のオープンスタンダードに基づいており、完全に互換性があります: OpenAPI
|
|
|
44d6223 |
(以前は Swagger として知られていました) や JSON スキーマ.
|
|
|
44d6223 |
|
|
|
44d6223 |
* 本番アプリケーションを構築している開発チームのテストによる見積もり。}
|
|
|
44d6223 |
%global common_description_ko %{expand:
|
|
|
44d6223 |
FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트에 기초한
|
|
|
44d6223 |
Python3.6+의 API를 빌드하기 위한 웹 프레임워크입니다.
|
|
|
44d6223 |
|
|
|
44d6223 |
주요 특징으로:
|
|
|
44d6223 |
|
|
|
44d6223 |
• 빠름: (Starlette과 Pydantic 덕분에) NodeJS 및 Go와 대등할 정도로 매우 높은
|
|
|
44d6223 |
성능. 사용 가능한 가장 빠른 파이썬 프레임워크 중 하나.
|
|
|
44d6223 |
|
|
|
44d6223 |
• 빠른 코드 작성: 약 200%에서 300%까지 기능 개발 속도 증가.*
|
|
|
44d6223 |
• 적은 버그: 사람(개발자)에 의한 에러 약 40% 감소.*
|
|
|
44d6223 |
• 직관적: 훌륭한 편집기 지원. 모든 곳에서 자동완성. 적은 디버깅 시간.
|
|
|
44d6223 |
• 쉬움: 쉽게 사용하고 배우도록 설계. 적은 문서 읽기 시간.
|
|
|
44d6223 |
• 짧음: 코드 중복 최소화. 각 매개변수 선언의 여러 기능. 적은 버그.
|
|
|
1dc475a |
• 견고함: 준비된 프로덕션 용 코드를 얻으십시오. 자동 대화형 문서와 함께.
|
|
|
44d6223 |
• 표준 기반: API에 대한 (완전히 호환되는) 개방형 표준 기반: OpenAPI (이전에
|
|
|
44d6223 |
Swagger로 알려졌던) 및 JSON 스키마.
|
|
|
44d6223 |
|
|
|
44d6223 |
* 내부 개발팀의 프로덕션 애플리케이션을 빌드한 테스트에 근거한 측정}
|
|
|
1dc475a |
%global common_description_pl %{expand:
|
|
|
1dc475a |
FastAPI to nowoczesny, wydajny framework webowy do budowania API z użyciem
|
|
|
1dc475a |
Pythona 3.6+ bazujący na standardowym typowaniu Pythona.
|
|
|
1dc475a |
|
|
|
1dc475a |
Kluczowe cechy:
|
|
|
1dc475a |
|
|
|
1dc475a |
• Wydajność: FastAPI jest bardzo wydajny, na równi z NodeJS oraz Go (dzięki
|
|
|
1dc475a |
Starlette i Pydantic). Jeden z najszybszych dostępnych frameworków
|
|
|
1dc475a |
Pythonowych.
|
|
|
1dc475a |
• Szybkość kodowania: Przyśpiesza szybkość pisania nowych funkcjonalności o
|
|
|
1dc475a |
około 200% do 300%.*
|
|
|
1dc475a |
• Mniejsza ilość błędów: Zmniejsza ilość ludzkich (dewelopera) błędy o około
|
|
|
1dc475a |
40%.*
|
|
|
1dc475a |
• Intuicyjność: Wspaniałe wsparcie dla edytorów kodu. Dostępne wszędzie
|
|
|
1dc475a |
automatyczne uzupełnianie kodu. Krótszy czas debugowania.
|
|
|
1dc475a |
• Łatwość: Zaprojektowany by być prosty i łatwy do nauczenia. Mniej czasu
|
|
|
1dc475a |
spędzonego na czytanie dokumentacji.
|
|
|
1dc475a |
• Kompaktowość: Minimalizacja powtarzającego się kodu. Wiele funkcjonalności
|
|
|
1dc475a |
dla każdej deklaracji parametru. Mniej błędów.
|
|
|
1dc475a |
• Solidność: Kod gotowy dla środowiska produkcyjnego. Wraz z automatyczną
|
|
|
1dc475a |
interaktywną dokumentacją.
|
|
|
1dc475a |
• Bazujący na standardach: Oparty na (i w pełni kompatybilny z) otwartych
|
|
|
1dc475a |
standardach API: OpenAPI (wcześniej znane jako Swagger) oraz JSON Schema.
|
|
|
1dc475a |
|
|
|
1dc475a |
* oszacowania bazowane na testach wykonanych przez wewnętrzny zespół
|
|
|
1dc475a |
deweloperów, budujących aplikacie używane na środowisku produkcyjnym.}
|
|
|
44d6223 |
%global common_description_pt %{expand:
|
|
|
44d6223 |
FastAPI é um moderno e rápido (alta performance) framework web para construção
|
|
|
44d6223 |
de APIs com Python 3.6 ou superior, baseado nos type hints padrões do Python.
|
|
|
44d6223 |
|
|
|
44d6223 |
Os recursos chave são:
|
|
|
44d6223 |
|
|
|
44d6223 |
• Rápido: alta performance, equivalente a NodeJS e Go (graças ao Starlette e
|
|
|
44d6223 |
Pydantic). Um dos frameworks mais rápidos disponíveis.
|
|
|
44d6223 |
• Rápido para codar: Aumenta a velocidade para desenvolver recursos entre
|
|
|
44d6223 |
200% a 300%.*
|
|
|
44d6223 |
• Poucos bugs: Reduz cerca de 40% de erros induzidos por humanos
|
|
|
44d6223 |
(desenvolvedores).*
|
|
|
44d6223 |
• Intuitivo: Grande suporte a IDEs. Auto-Complete em todos os lugares. Menos
|
|
|
44d6223 |
tempo debugando.
|
|
|
44d6223 |
• Fácil: Projetado para ser fácil de aprender e usar. Menos tempo lendo
|
|
|
44d6223 |
documentação.
|
|
|
44d6223 |
• Enxuto: Minimize duplicação de código. Múltiplos recursos para cada
|
|
|
44d6223 |
declaração de parâmetro. Menos bugs.
|
|
|
44d6223 |
• Robusto: Tenha código pronto para produção. E com documentação interativa
|
|
|
44d6223 |
automática.
|
|
|
44d6223 |
• Baseado em padrões: Baseado em (e totalmente compatível com) os padrões
|
|
|
44d6223 |
abertos para APIs: OpenAPI (anteriormente conhecido como Swagger) e JSON
|
|
|
44d6223 |
Schema.
|
|
|
44d6223 |
|
|
|
44d6223 |
* estimativas baseadas em testes realizados com equipe interna de
|
|
|
44d6223 |
desenvolvimento, construindo aplicações em produção.}
|
|
|
79dc1b0 |
%global common_description_tr %{expand:
|
|
|
79dc1b0 |
FastAPI, Python 3.6+'nın standart type hintlerine dayanan modern ve hızlı
|
|
|
79dc1b0 |
(yüksek performanslı) API'lar oluşturmak için kullanılabilecek web framework'ü.
|
|
|
79dc1b0 |
|
|
|
79dc1b0 |
Ana özellikleri:
|
|
|
79dc1b0 |
|
|
|
79dc1b0 |
• Hızlı: çok yüksek performanslı, NodeJS ve Go ile eşdeğer seviyede
|
|
|
79dc1b0 |
performans sağlıyor, (Starlette ve Pydantic sayesinde.) Python'un en hızlı
|
|
|
79dc1b0 |
frameworklerinden bir tanesi.
|
|
|
79dc1b0 |
|
|
|
79dc1b0 |
• Kodlaması hızlı: Yeni özellikler geliştirmek neredeyse %200 - %300 daha hızlı.*
|
|
|
79dc1b0 |
• Daha az bug: Geliştirici (insan) kaynaklı hatalar neredeyse %40 azaltıldı.*
|
|
|
79dc1b0 |
• Sezgileri güçlü: Editor (otomatik-tamamlama) desteği harika. Otomatik
|
|
|
79dc1b0 |
tamamlama her yerde. Debuglamak ile daha az zaman harcayacaksınız.
|
|
|
79dc1b0 |
• Kolay: Öğrenmesi ve kullanması kolay olacak şekilde. Doküman okumak için
|
|
|
79dc1b0 |
harcayacağınız süre azaltıldı.
|
|
|
79dc1b0 |
• Kısa: Kod tekrarını minimuma indirdik. Fonksiyon parametrelerinin tiplerini
|
|
|
79dc1b0 |
belirtmede farklı yollar sunarak karşılaşacağınız bug'ları azalttık.
|
|
|
79dc1b0 |
• Güçlü: Otomatik dokümantasyon ile beraber, kullanıma hazır kod yaz.
|
|
|
79dc1b0 |
• Standartlar belirli: Tamamiyle API'ların açık standartlara bağlı ve (tam
|
|
|
79dc1b0 |
uyumlululuk içerisinde); OpenAPI (eski adıyla Swagger) ve JSON Schema.
|
|
|
79dc1b0 |
|
|
|
79dc1b0 |
* Bahsi geçen rakamsal ifadeler tamamiyle, geliştirme takımının kendi
|
|
|
79dc1b0 |
sundukları ürünü geliştirirken yaptıkları testlere dayanmakta.}
|
|
|
44d6223 |
%global common_description_zh %{expand:
|
|
|
44d6223 |
FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.6+
|
|
|
44d6223 |
并基于标准的 Python 类型提示。
|
|
|
44d6223 |
|
|
|
44d6223 |
关键特性:
|
|
|
44d6223 |
|
|
|
44d6223 |
• 快速:可与 NodeJS 和 Go 比肩的极高性能(归功于 Starlette 和 Pydantic)。
|
|
|
44d6223 |
最快的 Python web 框架之一。
|
|
|
44d6223 |
• 高效编码:提高功能开发速度约 200% 至 300%。*
|
|
|
44d6223 |
• 更少 bug:减少约 40% 的人为(开发者)导致错误。*
|
|
|
44d6223 |
• 智能:极佳的编辑器支持。处处皆可自动补全,减少调试时间。
|
|
|
44d6223 |
• 简单:设计的易于使用和学习,阅读文档的时间更短。
|
|
|
44d6223 |
• 简短:使代码重复最小化。通过不同的参数声明实现丰富功能。bug 更少。
|
|
|
44d6223 |
• 健壮:生产可用级别的代码。还有自动生成的交互式文档。
|
|
|
44d6223 |
• 标准化:基于(并完全兼容)API 的相关开放标准:OpenAPI (以前被称为 Swagger)
|
|
|
44d6223 |
和 JSON Schema。
|
|
|
44d6223 |
|
|
|
44d6223 |
* 根据对某个构建线上应用的内部开发团队所进行的测试估算得出。}
|
|
|
44d6223 |
|
|
|
44d6223 |
%description %{common_description_en}
|
|
|
44d6223 |
|
|
|
44d6223 |
%description -l en %{common_description_en}
|
|
|
44d6223 |
%description -l es %{common_description_es}
|
|
|
44d6223 |
%description -l ja %{common_description_ja}
|
|
|
44d6223 |
%description -l ko %{common_description_ko}
|
|
|
1dc475a |
%description -l pl %{common_description_pl}
|
|
|
44d6223 |
%description -l pt %{common_description_pt}
|
|
|
79dc1b0 |
%description -l tr %{common_description_tr}
|
|
|
44d6223 |
%description -l zh %{common_description_zh}
|
|
|
44d6223 |
|
|
|
44d6223 |
|
|
|
f41ab0b |
%pyproject_extras_subpkg -n python3-fastapi all
|
|
|
44d6223 |
|
|
|
44d6223 |
|
|
|
f41ab0b |
%package -n python3-fastapi
|
|
|
44d6223 |
Summary: %{sum_en}
|
|
|
44d6223 |
|
|
|
44d6223 |
Summary(en): %{sum_en}
|
|
|
44d6223 |
Summary(es): %%{sum_es}
|
|
|
44d6223 |
Summary(ja): %{sum_ja}
|
|
|
44d6223 |
Summary(ko): %{sum_ko}
|
|
|
1dc475a |
Summary(pl): %{sum_pl}
|
|
|
44d6223 |
Summary(pt): %{sum_pt}
|
|
|
79dc1b0 |
Summary(tr): %{sum_tr}
|
|
|
44d6223 |
Summary(zh): %{sum_zh}
|
|
|
44d6223 |
|
|
|
f41ab0b |
%description -n python3-fastapi %{common_description_en}
|
|
|
f41ab0b |
|
|
|
f41ab0b |
%description -n python3-fastapi -l en %{common_description_en}
|
|
|
f41ab0b |
%description -n python3-fastapi -l es %{common_description_es}
|
|
|
f41ab0b |
%description -n python3-fastapi -l ja %{common_description_ja}
|
|
|
f41ab0b |
%description -n python3-fastapi -l ko %{common_description_ko}
|
|
|
1dc475a |
%description -n python3-fastapi -l pl %{common_description_pl}
|
|
|
f41ab0b |
%description -n python3-fastapi -l pt %{common_description_pt}
|
|
|
79dc1b0 |
%description -n python3-fastapi -l tr %{common_description_tr}
|
|
|
f41ab0b |
%description -n python3-fastapi -l zh %{common_description_zh}
|
|
|
44d6223 |
|
|
|
44d6223 |
|
|
|
9449886 |
%prep
|
|
|
f41ab0b |
%autosetup -n fastapi-%{version} -p1
|
|
|
44d6223 |
|
|
|
44d6223 |
# Comment out all dependencies on orjson (for ORJSONResponse); it cannot be
|
|
|
44d6223 |
# packaged in Fedora until it builds with the stable Rust toolchain instead of
|
|
|
44d6223 |
# the nightly one. Note that this removes it from the “all” extra metapackage.
|
|
|
b286afb |
sed -r -i 's/("orjson\b.*",)/# \1/' pyproject.toml
|
|
|
44d6223 |
# Comment out test dependencies that are only for linting/formatting/analysis,
|
|
|
44d6223 |
# and will not be used.
|
|
|
b286afb |
sed -r -i 's/("(mypy|black|flake8|isort|autoflake)\b.*",)/# \1/' pyproject.toml
|
|
|
e886395 |
# We won’t be running a type checker (mypy), so we don’t need any
|
|
|
e886395 |
# auto-generated PEP 561 stub packages:
|
|
|
e886395 |
sed -r -i 's/("types-(u|or)json\b.*",)/# \1/' pyproject.toml
|
|
|
1dc475a |
# Selectively allow newer versions for certain tightly-pinned dependencies:
|
|
|
711e415 |
sed -r -i 's/("((httpx|pytest)\b)[^<"]*),[[:blank:]]*<[^"]*/\1/' pyproject.toml
|
|
|
44d6223 |
|
|
|
a4fe319 |
# Remove bundled js-termynal 0.0.1; since we are not building documentation, we
|
|
|
a4fe319 |
# do this very bluntly:
|
|
|
a4fe319 |
rm -rvf docs/*/docs/js docs/*/docs/css
|
|
|
352bf21 |
|
|
|
9449886 |
|
|
|
b358641 |
%generate_buildrequires
|
|
|
b358641 |
# Tests under tests/test_tutorial may require dependencies that are only in the
|
|
|
b358641 |
# dev extra.
|
|
|
a4fe319 |
%pyproject_buildrequires -x all,test,dev
|
|
|
b358641 |
|
|
|
b358641 |
|
|
|
9449886 |
%build
|
|
|
44d6223 |
%pyproject_wheel
|
|
|
44d6223 |
|
|
|
9449886 |
|
|
|
9449886 |
%install
|
|
|
44d6223 |
%pyproject_install
|
|
|
f41ab0b |
%pyproject_save_files fastapi
|
|
|
44d6223 |
|
|
|
9449886 |
|
|
|
9449886 |
%check
|
|
|
44d6223 |
# Requires orjson:
|
|
|
24e0de6 |
# tests/test_tutorial/test_custom_response/test_tutorial001b.py
|
|
|
44d6223 |
# tests/test_default_response_class.py
|
|
|
44d6223 |
%pytest \
|
|
|
bb28785 |
--ignore=tests/test_tutorial/test_custom_response/test_tutorial001b.py \
|
|
|
44d6223 |
--ignore=tests/test_default_response_class.py
|
|
|
9449886 |
|
|
|
44d6223 |
|
|
|
f41ab0b |
%files -n python3-fastapi -f %{pyproject_files}
|
|
|
9449886 |
%license LICENSE
|
|
|
a4fe319 |
%doc CONTRIBUTING.md
|
|
|
9449886 |
%doc README.md
|
|
|
44d6223 |
|
|
|
44d6223 |
|
|
|
9449886 |
%changelog
|
|
|
1d4f7c9 |
%autochangelog
|