Leave the tedious operation to the back end
Project description
Warker
Warker is a very simple HTTP interface based on Flask
Install
pip install warker -U
Usage
from warker import WarkerServer
from warker import ApiResponse
app = WarkerServer(
name="hello",
host="127.0.0.1",
port=5000,
debug=False,
loading=True,
)
def hi():
return ApiResponse({
"msg": "Hello World!"
},status=200)
app.install("hi", hi)
app.running()
It is index
{
"name": "hello",
"workers": {
"hi": "/workers/hi"
}
}
It is workers
{
"msg": "Hello World!"
}
And you can get Request
and Session
, they based on Flask
from warker import request
from warker import session
Link
Website: https://github.com/isclub/warker
Releases: https://pypi.org/project/warker
License
MIT LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
warker-1.1.tar.gz
(1.8 kB
view details)
File details
Details for the file warker-1.1.tar.gz
.
File metadata
- Download URL: warker-1.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55f614cc2e8b06303207e9cf327d2976ed197e0892a807d9c4389c014c7363b4 |
|
MD5 | 25d11a0ded7e06eb3e4c61cd7ff3bed4 |
|
BLAKE2b-256 | 2c1f149e0469e8717768db4e6b8addcfad48bd125bdecc90c8f013b5108bda54 |