Python Function with POST Body - Fission Typing CST Test
Loading…
Python Function with POST Body — Fission Code
A Python HTTP function that reads JSON from POST body.
# fission/demo/python_post.yaml
apiVersion: fission.io/v1
kind: Function
metadata:
name: echo-python
namespace: default
spec:
environment:
name: python
runtime: python3
code:
inline:
function: |
import json
def main(req):
data = json.loads(req.body)
return {'received': data}
routes:
- path: /echo
method: POSTFission Language Guide
Fission is a serverless framework for Kubernetes that allows developers to deploy functions quickly without managing infrastructure. It focuses on fast, event-driven, and scalable function execution.
Primary Use Cases
- ▸Serverless microservices
- ▸Event-driven functions for Kubernetes apps
- ▸REST API endpoints
- ▸Cron-based background jobs
- ▸Data processing pipelines triggered by messages
Notable Features
- ▸Zero-configuration deployment
- ▸Automatic scaling of functions
- ▸Supports multiple language runtimes
- ▸Event-driven architecture
- ▸Integration with Kubernetes ecosystem
Origin & Creator
Fission was created by Platform9 Systems in 2017 as an open-source serverless framework for Kubernetes.
Industrial Note
Fission is particularly suited for teams already running Kubernetes who want lightweight, event-driven serverless functions without managing containers manually.