indigo-dc / flaat

FLAsk with Access Tokens - FLAAT
MIT License
11 stars 6 forks source link

Outdated examples #57

Closed BorjaEst closed 1 year ago

BorjaEst commented 2 years ago

It looks some objects used in the examples are not present in the library. Probably those were renamed?

>>> from examples import example_flask
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/borja/Projects/flaat/examples/example_flask.py", line 6, in <module>
    from flaat.requirements import HasAARCEntitlement, HasGroup, ValidLogin
ImportError: cannot import name 'HasGroup' from 'flaat.requirements' (/home/borja/Projects/flaat/flaat/requirements.py)

Context:

$ pip show flaat
Name: flaat
Version: 1.0.1
Summary: User authorization for OIDC authenticated python web APIs.
Home-page: https://github.com/indigo-dc/flaat
Author: Marcus Hardt
Author-email: hardt@kit.edu
License: MIT
Location: /home/borja/miniconda3/envs/flaat/lib/python3.8/site-packages
Requires: liboidcagent, aarc-entitlement, cachetools, configargparse, pyjwt, humanfriendly, requests
Required-by: 
dianagudu commented 2 years ago

Indeed, the flask and fastapi examples are outdated, see also https://github.com/indigo-dc/flaat/issues/54#issuecomment-1074961774.

If you feel like bringing any of them up-to-date, you can have a look at the aio example.

dianagudu commented 1 year ago

fixed with #69 #70