Skip to main content

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 via pipx
  • 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")

  1. Implement the code changes and commit.

  2. Update the CHANGELOG.md to include the change in the "Unreleased" section.

  3. Commit, push and create a PR to the upstream repository's main branch.

  4. Solicit a code-read from another team member.

  5. Upon approval, squash and merge to main.

  6. (optional) cleanup by removing the worktree and associated local and remote branch.

  7. (optional) pull into local fork's main and push to remote fork main.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

func_python-0.2.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

func_python-0.2.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

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

Hashes for func_python-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0c6821a1a78a90714c6f416166db6998de4925fa58792d58125d98e774debf47
MD5 243ac7bbb83db2df2e57e728bb5d149e
BLAKE2b-256 e9365e01ae997a8b2a11192cf2d7f9f7b5cf7df4d6ae75e8ba12999edb405ea6

See more details on using hashes here.

Provenance

The following attestation bundles were made for func_python-0.2.0.tar.gz:

Publisher: publish.yaml on knative-extensions/func-python

Attestations:

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

Hashes for func_python-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0d87deb208d8f38044ad37aeccef99c216b829fd0091440d689b30c3894040
MD5 ebe1e3c627da2bad2ce288489354d406
BLAKE2b-256 eebd37ac0d261d204c8c62e7181911c7c0f1bf1e9ba533eaadc58bb02f929241

See more details on using hashes here.

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

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page