mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-07 20:37:44 +00:00
19 lines
347 B
Python
Executable File
19 lines
347 B
Python
Executable File
#!/usr/bin/env python3
|
|
'''
|
|
Basic example of a resource server
|
|
'''
|
|
|
|
import flask
|
|
|
|
import connexion
|
|
|
|
|
|
def get_secret() -> str:
|
|
# the token's uid will be set in request.user
|
|
return 'You are: {uid}'.format(uid=flask.request.user)
|
|
|
|
if __name__ == '__main__':
|
|
app = connexion.App(__name__)
|
|
app.add_api('app.yaml')
|
|
app.run(port=8080)
|