Отдать содержимое директории во Flask


--- app.py
  • app.py
#!/usr/bin/env python3

__author__ = 'RemiZOffAlex'
__email__ = 'remizoffalex@mail.ru'

from flask import Flask, request, send_from_directory


app = Flask(__name__)

@app.route('/helps/<path:path>')
def helps(path):
    return send_from_directory('docs', path)

if __name__ == "__main__":
    app.run()

Ресурсы


GitLab
© RemiZOffAlex