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.2.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for flaskservice-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d0a7d77ef1ca75c2deb36a0f242839319b22194711bc4c2b737cf5a9de539c4 |
|
MD5 | fc3247de2c92fedc4c4269c90a78041d |
|
BLAKE2b-256 | 67f012eb5244753dc2abe2023ef6863f441007f0c19fa4d5eb362a6e2210d76d |