Quick start web services
Project description
Flask Services
Get started
Install with pip
pip install flaskservice
or
python -m pip install flaskservice
Example Code
from flaskservice import Api, View
class ExampleView(View):
# parameters of your flaskservice
name: str = "Joab Leite" # it is not required because it has a defined value
height: float # Required
def get(self):
print(self.name)
return self.response(message=10)
def post(self):
return self.response(self.name)
api = Api(__name__)
api.add_view(ExampleView, urls="/example")
api.runserver(host='127.0.0.1', port=5000, debug=True)
Server is running on default port 5000 if not changed.
Send post
or get
and see result (:
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
flaskservice-0.0.4.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file flaskservice-0.0.4.tar.gz
.
File metadata
- Download URL: flaskservice-0.0.4.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.15.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11e82ec6a8d83d99a93ae82fc2b3e6b4ce7d26e999a94b51c5721bd509867f03 |
|
MD5 | 60bad1a6464b17c4eca1dd0506e6b769 |
|
BLAKE2b-256 | 97cd2406378c619574e57d725559046ce51931283d81efbde2cb5d67fbced606 |
File details
Details for the file flaskservice-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: flaskservice-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.15.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc826e1eeafaa1077a6200993495da6a561d1364997fba2c8b34da7d85721f78 |
|
MD5 | fce29dd58c40b023cf3e62046c43a3af |
|
BLAKE2b-256 | 969d417fa87d13cf5d92e31290e7221397e6cde989f89c4dbc448d33e7a33eca |