File: image_serve.py

package info (click to toggle)
python-hug 2.6.0-2.4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,072 kB
  • sloc: python: 8,938; sh: 99; makefile: 17
file content (7 lines) | stat: -rw-r--r-- 151 bytes parent folder | download
1
2
3
4
5
6
7
import hug


@hug.get("/image.png", output=hug.output_format.png_image)
def image():
    """Serves up a PNG image."""
    return "../artwork/logo.png"