Keycloak integration for Python FastAPI

Overview

FastAPI Keycloak Integration

CodeFactor

Documentation

Introduction

Welcome to fastapi-keycloak. This projects goal is to ease the integration of Keycloak (OpenID Connect) with Python, especially FastAPI. FastAPI is not necessary but is encouraged due to specific features. Currently, this package supports only the password flow. However, the get_current_user() method accepts any JWT that was signed using Keycloak's private key.

!!! Caution This package is currently under development and is not yet officially released. However, you may still use it and contribute to it.

TLDR;

FastAPI Keycloak enables you to do the following things without writing a single line of additional code:

  • Verify identities and roles of users with Keycloak
  • Get a list of available identity providers
  • Create/read/delete users
  • Create/read/delete roles
  • Assign/remove roles from users
  • Implement the password flow (login/callback/logout)

Example

This example assumes you use a frontend technology (such as React, Vue, or whatever suits you) to render your pages and merely depicts a protected backend

app.py

import uvicorn
from fastapi import FastAPI, Depends

from fastapi_keycloak import FastAPIKeycloak, OIDCUser

app = FastAPI()
idp = FastAPIKeycloak(
    app=app,
    server_url="https://auth.some-domain.com/auth",
    client_id="some-client",
    client_secret="some-client-secret",
    admin_client_secret="admin-cli-secret",
    realm="some-realm-name",
    callback_uri="http://localhost:8081/callback"
)


@app.get("/premium", tags=["secured-endpoint"])
def premium(user: OIDCUser = Depends(idp.get_current_user(required_roles=["premium"]))):
    return f'Hi premium user {user}'


@app.get("/user/roles", tags=["secured-endpoint"])
def user_roles(user: OIDCUser = Depends(idp.get_current_user)):
    return f'{user.roles}'


if __name__ == '__main__':
    uvicorn.run('app:app', host="127.0.0.1", port=8081)
Comments
  • Error when initializing example project

    Error when initializing example project

    Hello!

    really good project, i love keycloak and fastapi :-). Unfortunately I am not able to get it running and I guess this is due to a bug:

    The error happens, when I the token is decoded:

    PS C:\Users\User\Desktop\KeyCloakFastAPI> python .\app.py
    {'exp': 1649355552, 'iat': 1649355252, 'jti': '51e67522-19f7-45b0-9894-e862b440106b', 'iss': 'http://localhost:8085/auth/realms/Test', 'sub': '33b940e2-0bdb-49a7-9356-e6e230f49619', 'ty
    p': 'Bearer', 'azp': 'admin-cli', 'acr': '1', 'scope': 'profile email', 'clientId': 'admin-cli', 'clientHost': '172.23.0.1', 'email_verified': False, 'preferred_username': 'service-acco
    unt-admin-cli', 'clientAddress': '172.23.0.1'}
    

    I my token I don´t have "resource_access, which leads to "None" and to a follow up error:

    AttributeError: 'NoneType' object has no attribute 'get'

    traceback:

    Traceback (most recent call last):
      File ".\app.py", line 7, in <module>
        idp = FastAPIKeycloak(
      File "C:\Users\User\anaconda3\lib\site-packages\fastapi_keycloak\api.py", line 129, in __init__
        self._get_admin_token()  # Requests an admin access token on startup
      File "C:\Users\User\anaconda3\lib\site-packages\fastapi_keycloak\api.py", line 292, in _get_admin_token
        self.admin_token = response.json()['access_token']
      File "C:\Users\User\anaconda3\lib\site-packages\fastapi_keycloak\api.py", line 159, in admin_token
        if not decoded_token.get('resource_access').get('realm-management') or not decoded_token.get('resource_access').get('account'):
    AttributeError: 'NoneType' object has no attribute 'get'
    

    Is there something I did wrong or is this an error in the lib?

    bug 
    opened by Coding-Crashkurse 7
  • Object non evaluated on getting decoded_token from Keycloak

    Object non evaluated on getting decoded_token from Keycloak

    How to reproduce ?

    Env preparation.

    pipenv install fastapi fastapi-keycloak
    

    I followed your quickstart and full example instructions then :

    pipenv run python main.py
    

    What the result?

    pipenv run python main.py 
    Traceback (most recent call last):
      File "main.py", line 10, in <module>
        idp = FastAPIKeycloak(
      File "/home/germainlef/.local/share/virtualenvs/auth-keycloak-WIW7vmvr/lib/python3.8/site-packages/fastapi_keycloak/api.py", line 125, in __init__
        self._get_admin_token()  # Requests an admin access token on startup
      File "/home/germainlef/.local/share/virtualenvs/auth-keycloak-WIW7vmvr/lib/python3.8/site-packages/fastapi_keycloak/api.py", line 285, in _get_admin_token
        self.admin_token = response.json()['access_token']
      File "/home/germainlef/.local/share/virtualenvs/auth-keycloak-WIW7vmvr/lib/python3.8/site-packages/fastapi_keycloak/api.py", line 154, in admin_token
        if not decoded_token.get('resource_access').get('realm-management') or not decoded_token.get('resource_access').get('account'):
    AttributeError: 'NoneType' object has no attribute 'get'
    
    documentation enhancement 
    opened by germainlefebvre4 7
  • Raise a UserNotFound exception when the query on get_user() does not match any users

    Raise a UserNotFound exception when the query on get_user() does not match any users

    It seems that if the search of users based on a query string return no users, the code assumes that there will always be some results and it "chokes" when none are found.

    opened by stratosgear 6
  • run locally

    run locally

    I want to use this example locally without docker https://fastapi-keycloak.code-specialist.com/full_example/ but this give me this error message error at line 7

    • client_secret = client > client_id > credential > Secret
    • admin_client_secret = admin_cli > credential > Secret

    and please specify that fastapi_keycloak will work for new keycloak version 17

    The error message is

    (venv) (base) [email protected]:/office/My Projects/keycloak_implementation$ uvicorn main:app --reload --port 8001 INFO: Will watch for changes in these directories: ['/office/My Projects/keycloak_implementation'] INFO: Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit) INFO: Started reloader process [18160] using watchgod Process SpawnProcess-1: Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/uvicorn/subprocess.py", line 76, in subprocess_started target(sockets=sockets) File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/uvicorn/server.py", line 60, in run return asyncio.run(self.serve(sockets=sockets)) File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "uvloop/loop.pyx", line 1501, in uvloop.loop.Loop.run_until_complete File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/uvicorn/server.py", line 67, in serve config.load() File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/uvicorn/config.py", line 458, in load self.loaded_app = import_from_string(self.app) File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/uvicorn/importer.py", line 21, in import_from_string module = importlib.import_module(module_str) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/office/My Projects/keycloak_implementation/./main.py", line 7, in idp = FastAPIKeycloak( File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/fastapi_keycloak/api.py", line 129, in init self._get_admin_token() # Requests an admin access token on startup File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/fastapi_keycloak/api.py", line 288, in _get_admin_token response = requests.post(url=self.token_uri, headers=headers, data=data) File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/requests/api.py", line 117, in post return request('post', url, data=data, json=json, **kwargs) File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/requests/sessions.py", line 515, in request prep = self.prepare_request(req) File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/requests/sessions.py", line 443, in prepare_request p.prepare( File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/requests/models.py", line 318, in prepare self.prepare_url(url, params) File "/office/My Projects/keycloak_implementation/venv/lib/python3.8/site-packages/requests/models.py", line 392, in prepare_url raise MissingSchema(error) requests.exceptions.MissingSchema: Invalid URL 'None': No scheme supplied. Perhaps you meant http://None?

    enhancement keycloak compatbility 
    opened by bwithai 6
  • Parse token for additional information

    Parse token for additional information

    I've been using https://github.com/elbernv/fastapi-keycloack to add security to my routes. I was trying to switch to using this library, seeing as though it is getting regular updates. I was wondering if it's currently possible to decode more from the token than what the OIDCUser object currently returns?

    For example, I've added the users group memberships to the profile scope, I've also added it as it's own scope, so two questions:

    1. Is it possible to fetch the group memberships from the token when using the profile scope?
    2. Is it possible to add more scopes? It seems like only profile and email are currently available when adding security to the FastAPI application.

    Thank you.

    documentation enhancement 
    opened by afraazali 6
  • Validate token in current_user

    Validate token in current_user

    We figured that current_user(line 220) function when receiving a token, doesn't validate the token like lib does in admin_token(line 141) method.

    Is it by design or can I create a fix for that?

    opened by valeriiduz 4
  • Upload Example file for fastapi scopes declaration with keycloak support

    Upload Example file for fastapi scopes declaration with keycloak support

    @yannicschroeer ,

    Any timeline for uploading the FastAPI scopes check example using this library?

    Also, I would like to know, if there is an example to configure SSO for multiple microservices and MFA

    Thanks, Uday

    documentation enhancement 
    opened by Udayaprasad 3
  • Fix the type hint of get_current_user

    Fix the type hint of get_current_user

    FastAPIs Depends function expects a callable. get_current_user is returning a callable but its type hint did not reflect this.

    It's just a small change but PyCharms type checker annoyed me...

    opened by DaGuich 2
  • manifest for jboss/keycloak:16.0.1 not found

    manifest for jboss/keycloak:16.0.1 not found

    Hi,

    it seems that the keycloak image tag used in the docker-compose file example in doc/getting_started does not exist: ERROR: manifest for jboss/keycloak:16.0.1 not found The existing tags are shown here (I used 16.1.1).

    opened by julj 2
  • Unable to authenticate users on swagger doc through the Authorize

    Unable to authenticate users on swagger doc through the Authorize "OAuth2PasswordBearer" form

    Unable to connect with user (here [email protected]) using the "Authorize" button and "OAuth2PasswordBearer" form. 2022-01-06 08_48_55-FastAPI - Swagger UI

    A CORS error is achieved on non-https website. 2022-01-06 08_46_49-FastAPI - Swagger UI

    I suggest adding the parameter on your documentation to allow testing the whole process on dev platform (that i the point of playing the quickstart guide).

    Client> test-client : Fil lthe WebOrigins attribute to *.

    2022-01-06 08_55_41-Keycloak Admin Console

    opened by germainlefebvre4 2
  • Initial version proposal

    Initial version proposal

    Done

    • Initial version proposal
    • Docs: https://fastapi-keycloak.code-specialist.com/

    TODO before merging

    • [x] Unit tests - [ ] 100% test coverage - [ ] Test infrastructure running on actions runner
    opened by code-specialist 2
  • Can we pass dynamic realm, client_id and client_secret params to FastAPIKeycloak class

    Can we pass dynamic realm, client_id and client_secret params to FastAPIKeycloak class

    I am looking for a multi-tenant-based solution, where the customer maintains different realms for different vendors. How could we manage the FastAPIKeycloak() creation and .get_current_user() authentication/authorisation?

    Based on the URL I am figuring out the tenant and getting the relevant Database details, but now confused about how we could use the below OIDCUser in the Endpoint definition.

    user: OIDCUser = Depends(keycloak_obj.get_current_user())

    @yannicschroeer

    opened by Udayaprasad 0
  • Unable to pip install from python docker images

    Unable to pip install from python docker images

    Hello,

    pip fails to install fastapi_keycloak on the following docker images:

    • python3.8
    • python3.8-slim
    • python3.9-slim
    • python3.10-slim

    I have no clue why it fails (tested with pip==22.3, 22.1.2, 22.2)

    Obtaining file:///tmp/fastapi-keycloak
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Checking if build backend supports build_editable: started
      Checking if build backend supports build_editable: finished with status 'done'
      Getting requirements to build editable: started
      Getting requirements to build editable: finished with status 'error'
      error: subprocess-exited-with-error
      
      × Getting requirements to build editable did not run successfully.
      │ exit code: 1
      ╰─> [43 lines of output]
          Traceback (most recent call last):
            File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
              main()
            File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
              json_out['return_val'] = hook(**hook_input['kwargs'])
            File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 132, in get_requires_for_build_editable
              return hook(config_settings)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 446, in get_requires_for_build_editable
              return self.get_requires_for_build_wheel(config_settings)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
              return self._get_build_requires(config_settings, requirements=['wheel'])
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
              self.run_setup()
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 483, in run_setup
              super(_BuildMetaLegacyBackend,
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
              exec(code, locals())
            File "<string>", line 9, in <module>
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
              return distutils.core.setup(**attrs)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 159, in setup
              dist.parse_config_files()
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 868, in parse_config_files
              pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 62, in apply_configuration
              config = read_configuration(filepath, True, ignore_option_errors, dist)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 140, in read_configuration
              return expand_configuration(asdict, root_dir, ignore_option_errors, dist)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 195, in expand_configuration
              return _ConfigExpander(config, root_dir, ignore_option_errors, dist).expand()
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 242, in expand
              self._expand_all_dynamic(dist, package_dir)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 279, in _expand_all_dynamic
              obtained_dynamic = {
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 280, in <dictcomp>
              field: self._obtain(dist, field, package_dir)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 326, in _obtain
              self._ensure_previously_set(dist, field)
            File "/tmp/pip-build-env-q7yvswdc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 305, in _ensure_previously_set
              raise OptionError(msg)
          distutils.errors.DistutilsOptionError: No configuration found for dynamic 'description'.
          Some dynamic fields need to be specified via `tool.setuptools.dynamic`
          others must be specified via the equivalent attribute in `setup.py`.
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: subprocess-exited-with-error
    
    × Getting requirements to build editable did not run successfully.
    │ exit code: 1
    ╰─> See above for output.
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
    
    
    opened by remicres 2
  • fastapi-keycloak docs outdated?

    fastapi-keycloak docs outdated?

    Hello all,

    Are there any plans on updating this library to use the latest version of Keycloak and also update the docs?

    I think this library is based on Keycloak version 16.1.0 as seen here: https://fastapi-keycloak.code-specialist.com/quick_start/

     keycloak:
        image: jboss/keycloak:16.1.0   
    

    Also: https://fastapi-keycloak.code-specialist.com/reference/ It should be "FastAPIKeycloak" instead of "KeycloakFastAPI"

    Thank you very much for your valuable time.

    Best Regards,

    koufopoulosf

    opened by koufopoulosf 0
  • The `realm-export.json` file in the documentation website needs to be updated

    The `realm-export.json` file in the documentation website needs to be updated

    The link still references the old json file from before #38 was merged

    Reference: https://stackoverflow.com/questions/71787580/keycloak-api-does-not-contain-resource-access/73778730#73778730

    opened by pmav99 0
  • unable to connect to keycloak server

    unable to connect to keycloak server

    keycloak version :: 19.0.0

    requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /realms/RealmOne/.well-known/openid-configuration (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f94efdfe610>: Failed to establish a new connection: [Errno 111] Connection refused'))

    ( server_url="http://localhost:8080", client_id="myApp", client_secret="Y49wuMTCnLbX2bufuasJ73RSR9ivLWLu", admin_client_secret="admin-cli-secret", realm="RealmOne", callback_uri="http://localhost:8080/callback" ) I cannot find the admin secret anywhere in keycloak .

    opened by abhijitgujar86 1
Releases(1.0.9)
  • 1.0.9(Dec 20, 2022)

    What's Changed

    • Enhanced Maintainer Notice by @JonasScholl in https://github.com/code-specialist/fastapi-keycloak/pull/77
    • Bump certifi from 2021.10.8 to 2022.12.7 by @dependabot in https://github.com/code-specialist/fastapi-keycloak/pull/79
    • Bump certifi from 2021.10.8 to 2022.12.7 in /fastapi_keycloak by @dependabot in https://github.com/code-specialist/fastapi-keycloak/pull/78

    New Contributors

    • @dependabot made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/79

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.8...1.0.9

    Source code(tar.gz)
    Source code(zip)
  • 1.0.8(Oct 19, 2022)

    What's Changed

    • Improve test stability by @JonasScholl in https://github.com/code-specialist/fastapi-keycloak/pull/64
    • Move examples from docs to a folder, update docs slightly by @laxdog in https://github.com/code-specialist/fastapi-keycloak/pull/68
    • Update keycloak_configuration.md by @slavong in https://github.com/code-specialist/fastapi-keycloak/pull/73
    • Raise a UserNotFound exception when the query on get_user() does not match any users by @stratosgear in https://github.com/code-specialist/fastapi-keycloak/pull/72

    New Contributors

    • @laxdog made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/68
    • @slavong made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/73

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.7...1.0.8

    Source code(tar.gz)
    Source code(zip)
  • 1.0.7(Jul 24, 2022)

    What's Changed

    • Model fix by @twistfire92 in https://github.com/code-specialist/fastapi-keycloak/pull/56
    • Fix the type hint of get_current_user by @DaGuich in https://github.com/code-specialist/fastapi-keycloak/pull/59
    • Move the exception of missing 'realm_access section' into the model itself by @fherrera124 in https://github.com/code-specialist/fastapi-keycloak/pull/62
    • Throws a 404 when a user lookup fails. by @stratosgear in https://github.com/code-specialist/fastapi-keycloak/pull/61

    New Contributors

    • @DaGuich made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/59
    • @fherrera124 made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/62
    • @stratosgear made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/61

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.6...1.0.7

    Source code(tar.gz)
    Source code(zip)
  • 1.0.6(Jun 16, 2022)

    What's Changed

    • Extra fields in OIDCUser. #49 by @twistfire92 in https://github.com/code-specialist/fastapi-keycloak/pull/50
    • Update documentation to add error handler by @jonra1993 in https://github.com/code-specialist/fastapi-keycloak/pull/54

    New Contributors

    • @twistfire92 made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/50
    • @jonra1993 made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/54

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.5...1.0.6

    Source code(tar.gz)
    Source code(zip)
  • 1.0.5(May 19, 2022)

    What's Changed

    • Minor code improvements by @GitBib in https://github.com/code-specialist/fastapi-keycloak/pull/34
    • update realm-export.json to resolve quickstart issues by @jeromecremers in https://github.com/code-specialist/fastapi-keycloak/pull/38
    • Test Multiple Python Versions by @JonasScholl in https://github.com/code-specialist/fastapi-keycloak/pull/43
    • FastAPIKeycloak Timeout by @valeriiduz in https://github.com/code-specialist/fastapi-keycloak/pull/44
    • Fix Timeout Test by @JonasScholl in https://github.com/code-specialist/fastapi-keycloak/pull/45

    New Contributors

    • @jeromecremers made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/38
    • @JonasScholl made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/43
    • @valeriiduz made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/44

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.4...1.0.5

    Source code(tar.gz)
    Source code(zip)
  • 1.0.4(Mar 27, 2022)

    What's Changed

    • Initial roles by @yannicschroeer in https://github.com/code-specialist/fastapi-keycloak/pull/33

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.3...1.0.4

    Source code(tar.gz)
    Source code(zip)
  • 1.0.3(Mar 27, 2022)

    What's Changed

    • Fix Initial roles by @yannicschroeer in https://github.com/code-specialist/fastapi-keycloak/pull/32

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.2...1.0.3

    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Mar 27, 2022)

    What's Changed

    • Initial Roles on create_user by @yannicschroeer in https://github.com/code-specialist/fastapi-keycloak/pull/31

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.1...1.0.2

    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Mar 25, 2022)

    What's Changed

    • Fix docs by @yannicschroeer in https://github.com/code-specialist/fastapi-keycloak/pull/26
    • refactor(model): add resource access field in oidc user by @socar-humphrey in https://github.com/code-specialist/fastapi-keycloak/pull/29
    • Increase code quality by @GitBib in https://github.com/code-specialist/fastapi-keycloak/pull/28

    New Contributors

    • @socar-humphrey made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/29
    • @GitBib made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/28

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/1.0.0...1.0.1

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Mar 15, 2022)

    What's Changed

    • Make admin-client configurable by @thomasdarimont in https://github.com/code-specialist/fastapi-keycloak/pull/19
    • Update documentation by @code-specialist in https://github.com/code-specialist/fastapi-keycloak/pull/16
    • Add attributes to KeycloakUser by @tchalupnik in https://github.com/code-specialist/fastapi-keycloak/pull/21

    New Contributors

    • @thomasdarimont made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/19
    • @tchalupnik made their first contribution in https://github.com/code-specialist/fastapi-keycloak/pull/21

    Full Changelog: https://github.com/code-specialist/fastapi-keycloak/compare/0.3a0...1.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
Code Specialist
Code Quality Blog about simplifying concepts and making life easier for developers
Code Specialist
Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python 3.6 and above with performance auto-tuning. Optionally with Alpine Linux.

Supported tags and respective Dockerfile links python3.8, latest (Dockerfile) python3.7, (Dockerfile) python3.6 (Dockerfile) python3.8-slim (Dockerfil

Sebastián Ramírez 2.1k Dec 31, 2022
The template for building scalable web APIs based on FastAPI, Tortoise ORM and other.

FastAPI and Tortoise ORM. Powerful but simple template for web APIs w/ FastAPI (as web framework) and Tortoise-ORM (for working via database without h

prostomarkeloff 95 Jan 08, 2023
Turns your Python functions into microservices with web API, interactive GUI, and more.

Instantly turn your Python functions into production-ready microservices. Deploy and access your services via HTTP API or interactive UI. Seamlessly export your services into portable, shareable, and

Machine Learning Tooling 2.8k Jan 04, 2023
A FastAPI Framework for things like Database, Redis, Logging, JWT Authentication and Rate Limits

A FastAPI Framework for things like Database, Redis, Logging, JWT Authentication and Rate Limits Install You can install this Library with: pip instal

Tert0 33 Nov 28, 2022
A FastAPI WebSocket application that makes use of ncellapp package by @hemantapkh

ncellFastAPI author: @awebisam Used FastAPI to create WS application. Ncellapp module by @hemantapkh NOTE: Not following best practices and, needs ref

Aashish Bhandari 7 Oct 01, 2021
FastAPI Socket.io with first-class documentation using AsyncAPI

fastapi-sio Socket.io FastAPI integration library with first-class documentation using AsyncAPI The usage of the library is very familiar to the exper

Marián Hlaváč 9 Jan 02, 2023
Fetching Cryptocurrency Prices from Coingecko and Displaying them on Grafana

cryptocurrency-prices-grafana Fetching Cryptocurrency Prices from Coingecko and Displaying them on Grafana About This stack consists of: Prometheus (t

Ruan Bekker 7 Aug 01, 2022
Complete Fundamental to Expert Codes of FastAPI for creating API's

FastAPI FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3 based on standard Python type hints. The key featu

Pranav Anand 1 Nov 28, 2021
FastAPI Project Template

The base to start an openapi project featuring: SQLModel, Typer, FastAPI, JWT Token Auth, Interactive Shell, Management Commands.

A.Freud 4 Dec 05, 2022
REST API with FastAPI and JSON file.

FastAPI RESTAPI with a JSON py 3.10 First, to install all dependencies, in ./src/: python -m pip install -r requirements.txt Second, into the ./src/

Luis Quiñones Requelme 1 Dec 15, 2021
A server hosts a FastAPI application and multiple clients can be connected to it via SocketIO.

FastAPI_and_SocketIO A server hosts a FastAPI application and multiple clients can be connected to it via SocketIO. Executing server.py sets up the se

Ankit Rana 2 Mar 04, 2022
Sample project showing reliable data ingestion application using FastAPI and dramatiq

Create and deploy a reliable data ingestion service with FastAPI, SQLModel and Dramatiq This is the source code for the data ingestion service explain

François Voron 31 Nov 30, 2022
SQLAlchemy Admin for Starlette/FastAPI

SQLAlchemy Admin for Starlette/FastAPI SQLAdmin is a flexible Admin interface for SQLAlchemy models. Main features include: SQLAlchemy sync/async engi

Amin Alaee 683 Jan 03, 2023
Adds GraphQL support to your Flask application.

Flask-GraphQL Adds GraphQL support to your Flask application. Usage Just use the GraphQLView view from flask_graphql from flask import Flask from flas

GraphQL Python 1.3k Dec 31, 2022
Github timeline htmx based web app rewritten from Common Lisp to Python FastAPI

python-fastapi-github-timeline Rewrite of Common Lisp htmx app _cl-github-timeline into Python using FastAPI. This project tries to prove, that with h

Jan Vlčinský 4 Mar 25, 2022
This is an API developed in python with the FastApi framework and putting into practice the recommendations of the book Clean Architecture in Python by Leonardo Giordani,

This is an API developed in python with the FastApi framework and putting into practice the recommendations of the book Clean Architecture in Python by Leonardo Giordani,

0 Sep 24, 2022
implementation of deta base for FastAPIUsers

FastAPI Users - Database adapter for Deta Base Ready-to-use and customizable users management for FastAPI Documentation: https://fastapi-users.github.

2 Aug 15, 2022
API written using Fast API to manage events and implement a leaderboard / badge system.

Open Food Facts Events API written using Fast API to manage events and implement a leaderboard / badge system. Installation To run the API locally, ru

Open Food Facts 5 Jan 07, 2023
A simple Blogging Backend app created with Fast API

This is a simple blogging app backend built with FastAPI. This project is created to simulate a real CRUD blogging system. It is built to be used by s

Owusu Kelvin Clark 13 Mar 24, 2022
A kedro-plugin to serve Kedro Pipelines as API

General informations Software repository Latest release Total downloads Pypi Code health Branch Tests Coverage Links Documentation Deployment Activity

Yolan Honoré-Rougé 12 Jul 15, 2022