Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template azure function #3

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Implement Azure Function with fastapi. Change | operator by Union.
  • Loading branch information
Esther PlaIbanez committed Jul 19, 2022

Verified

This commit was signed with the committer’s verified signature.
messense messense
commit 9d459c9a3918c98379f625572c45768d26b906a5
Empty file removed __init__.py
Empty file.
3 changes: 2 additions & 1 deletion app/common/infra/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import Enum
from typing import Union

from fastapi import FastAPI
from fastapi_keycloak import FastAPIKeycloak
@@ -10,7 +11,7 @@ class IDPType(Enum):
KEYCLOAK = 0


def get_idp(keycloak_settings: KeycloakSettings | None):
def get_idp(keycloak_settings: Union[KeycloakSettings, None]):
# Check if configuration is defined to use Keycloak IDP
if keycloak_settings is None or keycloak_settings.auth_server is None or keycloak_settings.realm is None:
return None, None
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -7,4 +7,6 @@ fastapi
sqlmodel
fastapi_keycloak
pyyaml
pydantic[dotenv]
pydantic[dotenv]
pydantic[email]
aiosqlite