-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable Paketo builders for Python functions (#979)
This commit changes the Python functions to use the open source Paketo builders. The Paketo builders allow the use of a Procfile to indicate the desired default start process for the container, so this has been added to invoke Parliament at startup. Also, there were no README.md files for Python, so I added them too. Signed-off-by: Lance Ball <lball@redhat.com>
- Loading branch information
Showing
7 changed files
with
13,942 additions
and
13,843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: python -m parliament . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Python CloudEvents Function | ||
|
||
Welcome to your new Python function project! The boilerplate function | ||
code can be found in [`func.py`](./func.py). This function is meant | ||
to respond to [Cloud Events](https://cloudevents.io/). | ||
|
||
## 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 event to the function endpoint. | ||
|
||
|
||
## Testing | ||
|
||
This function project includes a [unit test](./test_func.py). Update this | ||
as you add business logic to your function in order to test its behavior. | ||
|
||
```console | ||
python test_func.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: python -m parliament . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Python HTTP Function | ||
|
||
Welcome to your new Python function project! The boilerplate function | ||
code can be found in [`func.py`](./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](./test_func.py). Update this | ||
as you add business logic to your function in order to test its behavior. | ||
|
||
```console | ||
python test_func.py | ||
``` |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.