Knative Functions Python Middleware
Project description
Python Func Runtime
This middleware is used by Knative Functions to expose a Function written in Python as a network service.
Contents
.
├── cmd
│ └── fhttp - Example a function using the http middleware
├── src/func_python
│ ├── http.py - HTTP Middleware
└── README.md - This Readme
Development
Minimal example of running the test Function:
- install
poetry
viapipx
- install dependencies with
poetry install
- activate the virtual environment managed by poetry via
poetry shell
Note that in some environments this command may cause collissions with configured keyboard shortcuts. If there are problems, you can instead source the environment variables directly with:source $(poetry env info --path)/bin/activate
- run the example via
poetry run python cmd/fhttp/main.py
- deactivate the virtual environment with
exit
A nice method of development using git worktrees:
p. From a personal fork, create a new worktree for the bug, feature or chore named appropriately (eg. "feature-a")
-
Implement the code changes and commit.
-
Update the CHANGELOG.md to include the change in the "Unreleased" section.
-
Commit, push and create a PR to the upstream repository's main branch.
-
Solicit a code-read from another team member.
-
Upon approval, squash and merge to main.
-
(optional) cleanup by removing the worktree and associated local and remote branch.
-
(optional) pull into local fork's main and push to remote fork main.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file func_python-0.2.0.tar.gz
.
File metadata
- Download URL: func_python-0.2.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c6821a1a78a90714c6f416166db6998de4925fa58792d58125d98e774debf47 |
|
MD5 | 243ac7bbb83db2df2e57e728bb5d149e |
|
BLAKE2b-256 | e9365e01ae997a8b2a11192cf2d7f9f7b5cf7df4d6ae75e8ba12999edb405ea6 |
Provenance
The following attestation bundles were made for func_python-0.2.0.tar.gz
:
Publisher:
publish.yaml
on knative-extensions/func-python
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
func_python-0.2.0.tar.gz
- Subject digest:
0c6821a1a78a90714c6f416166db6998de4925fa58792d58125d98e774debf47
- Sigstore transparency entry: 147465128
- Sigstore integration time:
- Predicate type:
File details
Details for the file func_python-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: func_python-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea0d87deb208d8f38044ad37aeccef99c216b829fd0091440d689b30c3894040 |
|
MD5 | ebe1e3c627da2bad2ce288489354d406 |
|
BLAKE2b-256 | eebd37ac0d261d204c8c62e7181911c7c0f1bf1e9ba533eaadc58bb02f929241 |
Provenance
The following attestation bundles were made for func_python-0.2.0-py3-none-any.whl
:
Publisher:
publish.yaml
on knative-extensions/func-python
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
func_python-0.2.0-py3-none-any.whl
- Subject digest:
ea0d87deb208d8f38044ad37aeccef99c216b829fd0091440d689b30c3894040
- Sigstore transparency entry: 147465129
- Sigstore integration time:
- Predicate type: