Python functions as REST objects, with clustering, load balancing and state replication; no containers or orchestration.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-primitive.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-primitive.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-primitive.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Dan Q Consolidate duplicate QUICKSTARTs on the top-level file 503f830 7 months ago History
hello.py · 566 bytes · 30 lines
1"""
2Simple hello world endpoint for testing
3"""
4
5
6def GET(request):
7 """Return a simple greeting"""
8 return {
9 'status': 'ok',
10 'message': 'Hello, World!',
11 'method': 'GET',
12 }
13
14
15def POST(request):
16 """Return a personalized greeting"""
17 name = request.get('name', 'World')
18 return {
19 'status': 'ok',
20 'message': f'Hello, {name}!',
21 'method': 'POST',
22 }
23
24
25__endpoint__ = {
26 'name': 'hello',
27 'description': 'Simple hello world endpoint for testing',
28 'version': '1.0.0',
29 'author': 'test',
30}