Quick Http web-service construction
Project description
qh
Quick Http web-service construction.
Getting from python to an http-service exposing them to the world, in the easiest way machinely possible.
Harnesses the great power of py2http without all the responsibilities.
This is meant for the desireable lightening fast development cycles during proof-of-conceptualization. As you move towards production, consider using one of those boring grown-up tools out there...
To install: pip install qh
Examples
When all goes as planned...
import qh
from qh import mk_http_service_app
def poke():
return 'here is a peek'
def foo(x: int):
return x + 2
def bar(name='world'):
return f"Hello {name}!"
app = mk_http_service_app([foo, bar, poke])
app.run()
Bottle v0.12.19 server starting up (using WSGIRefServer())...
Listening on http://127.0.0.1:8080/
Hit Ctrl-C to quit.
Now grab a browser and go to http://127.0.0.1:8080/ping...
{"ping": "pong"}
Now be happy (or go try the other function by doing some post requests).
Try ``http://127.0.0.1:8080/poke`...
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qh-0.0.2.tar.gz.
File metadata
- Download URL: qh-0.0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf1a9ba42a749a94da2fdc0ebcc7dc42bd3410a88cde73220bd622b9366bf082
|
|
| MD5 |
00634f5a1718f062a17d8492e42e7325
|
|
| BLAKE2b-256 |
eb50335b7b3b54c08ab33b8292ed83c3a63d0c5c07ec8e9c576475b0bd72983b
|
File details
Details for the file qh-0.0.2-py3-none-any.whl.
File metadata
- Download URL: qh-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc26e856b691e9daa77ff8886200fdd881871862808653ba94dfbfa5b235d36c
|
|
| MD5 |
25bb3b5be243ebad95bd2f3579d56a85
|
|
| BLAKE2b-256 |
53633c334f9f8692a81e3152009db8db25cf134ed66eb55ee66214669fc3b3ec
|