func/templates/python/http
Matej Vasek 6d4565158b
feat: enabled s2i for python (#1562)
* feat: enable s2i for python

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: update zz_filesystem_generated.go

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: test

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: test

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: test

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: script

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-02-20 16:45:26 +00:00
..
Procfile feat: enable Paketo builders for Python functions (#979) 2022-04-20 00:09:28 +00:00
README.md feat: enable Paketo builders for Python functions (#979) 2022-04-20 00:09:28 +00:00
app.sh feat: enabled s2i for python (#1562) 2023-02-20 16:45:26 +00:00
func.py feat: introduce echo return for Python http template (#1078) 2022-06-28 16:21:30 +00:00
requirements.txt chore: update python templates to use parliament context/event (#301) 2021-04-14 12:50:52 -04:00
test_func.py feat: introduce echo return for Python http template (#1078) 2022-06-28 16:21:30 +00:00

README.md

Python HTTP Function

Welcome to your new Python function project! The boilerplate function code can be found in func.py. This function will respond to incoming HTTP GET and POST requests.

Endpoints

Running this function will expose three endpoints.

  • / The endpoint for your function.
  • /health/readiness The endpoint for a readiness health check
  • /health/liveness The endpoint for a liveness health check

The health checks can be accessed in your browser at http://localhost:8080/health/readiness and http://localhost:8080/health/liveness.

You can use func invoke to send an HTTP request to the function endpoint.

Testing

This function project includes a unit test. Update this as you add business logic to your function in order to test its behavior.

python test_func.py