File: ping.py

package info (click to toggle)
python-falcon 3.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,048 kB
  • sloc: python: 28,376; makefile: 182; sh: 135; javascript: 66
file content (10 lines) | stat: -rw-r--r-- 207 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
from http import HTTPStatus

import falcon


class Pong:
    async def on_get(self, req, resp):
        resp.content_type = falcon.MEDIA_TEXT
        resp.text = 'PONG\n'
        resp.status = HTTPStatus.OK