Skip to main content

Quick start web services

Project description

Flask Services

Tests PyPi Publish PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flaskservice, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size flaskservice-0.0.4-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flaskservice-0.0.4.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page