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.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for flaskservice-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d321f0251c676bec058a6d9e21c8dca38d5f551b6905e3878ab2aab91ef52a9f |
|
MD5 | c1cbda38295037ff26e5f59506646bfa |
|
BLAKE2b-256 | 876aace3e639d25c66484068ef99019ef4364c08583cef30efb7eff2a3a45b0c |