aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-03-18 09:59:52 +0100
committerRicardo Wurmus <rekado@elephly.net>2023-05-09 19:43:44 +0200
commit0f7d8a83056054a8c3071b157184918070288900 (patch)
tree3d60afa292d208b3d4ad367a5f72d673dd948d1e /gnu/packages/python-web.scm
parentdd3ee6073e4f6e9eb86be2eaa847885da1131908 (diff)
downloadguix-0f7d8a83056054a8c3071b157184918070288900.tar
guix-0f7d8a83056054a8c3071b157184918070288900.tar.gz
gnu: Add python-fastapi.
* gnu/packages/python-web.scm (python-fastapi): New variable.
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm62
1 files changed, 62 insertions, 0 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index e6310fad58..99853acec5 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -8274,6 +8274,68 @@ SendGrid Web API v3 endpoints, including the new v3 /mail/send.")
Interface) framework/toolkit for building async web services in Python.")
(license license:bsd-3)))
+(define-public python-fastapi
+ (package
+ (name "python-fastapi")
+ (version "0.92.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "fastapi" version))
+ (sha256
+ (base32
+ "1pm4p5i9h732f0qag85yd9ngjz8x9bhs3fyk2j861cn8s9dhyfh2"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'drop-orjson
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("\"orjson.*\",") ""))))
+ (add-after 'unpack 'delete-failing-tests
+ (lambda _
+ (for-each
+ delete-file
+ (append
+ '("docs_src/app_testing/app_b_py310/test_main.py"
+ "tests/test_tutorial/test_templates/test_tutorial001.py")
+ (find-files "docs_src/sql_databases/"
+ "test_sql_app\\.py$")
+ (find-files "tests"
+ "test_(default|orjson)_response_class\\.py$")
+ (find-files "tests/test_tutorial"
+ "test_tutorial00(1b|9c)\\.py$")
+ (find-files "tests/test_tutorial"
+ "test_testing_databases.*\\.py$"))))))))
+ (propagated-inputs (list python-email-validator
+ python-httpx
+ python-itsdangerous
+ python-jinja2
+ python-multipart
+ python-starlette
+ python-pydantic
+ python-pyyaml
+ python-uvicorn
+ python-ujson))
+ (native-inputs (list python-databases
+ python-flask
+ python-hatchling
+ python-isort
+ python-jose
+ python-mypy
+ python-passlib
+ python-peewee
+ python-pytest
+ python-sqlalchemy
+ python-types-orjson
+ python-types-ujson))
+ (home-page "https://github.com/tiangolo/fastapi")
+ (synopsis "Web framework based on type hints")
+ (description "FastAPI provides a web API framework based on pydantic and
+starlette.")
+ (license license:expat)))
+
(define-public python-pyactiveresource
(package
(name "python-pyactiveresource")