https://github.com/ajvb/webpype-django
WebPype functionality for Django
https://github.com/ajvb/webpype-django
Last synced: 2 months ago
JSON representation
WebPype functionality for Django
- Host: GitHub
- URL: https://github.com/ajvb/webpype-django
- Owner: ajvb
- License: gpl-2.0
- Created: 2013-09-05T06:50:44.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-08T04:40:17.000Z (almost 13 years ago)
- Last Synced: 2025-09-11T16:14:07.609Z (10 months ago)
- Language: Python
- Size: 117 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
webpype-django
==============
WebPype functionality for Django
Currently in alpha stage, not ready for production use.
##### Example
##### Taken from: https://github.com/jpf/block-echo
import json
from django.views.generic import View
from webpype_django.view import WebPypeMixin
class BlockEchoExample(WebPypeMixin, View):
is_block = True
block_definition = {"name": "Echo",
"description": "An example WebPipe block echo service.",
"inputs": [
{"name": "in",
"type": "string",
"description": "String to echo"}],
"outputs": [
{"name": "out",
"type": "string",
"description": "Echoed string"}]}
def block(self, inputs):
return json.dumps({"outputs":
[{"out": json.loads(inputs)['inputs'][0]['in']}]
})