add fastapi as optional dependency, + first experiments

This commit is contained in:
Helmut Merz 2026-07-04 21:27:24 +02:00
parent db1f78f4e6
commit 778324ad33
3 changed files with 16 additions and 0 deletions

View file

@ -30,6 +30,7 @@ app = [
"zope.traversing",
]
auth = ["pyjwt[crypto]", "cryptography", "requests"]
fastapi = ["fastapi[standard]"]
test = ["zope.testrunner"]
#test = ["pytest"]

1
scopes/api/__init__.py Normal file
View file

@ -0,0 +1 @@
"""package scopes.api"""

14
scopes/api/main.py Normal file
View file

@ -0,0 +1,14 @@
# package scopes.api.main
from fastapi import FastAPI
app = FastAPI()
@app.get('/')
def read_root():
return {'Hello': 'World'}
@app.get('/persons/{name}')
def read_person(name: str, q: str | None = None):
return {'name': name, 'query': q}