Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 2.37 KB

README.md

File metadata and controls

65 lines (52 loc) · 2.37 KB

made with Flask

What Is This?

This is the most simplified form of a RESTful-API using the Flask microframework.

How To Use This

  1. Install requirements
    $ pip install -r requirements.txt
  2. Run the server.py file.
    $ python server.py
  3. Call the endpoints specified for the server.
    • You can use POSTMAN to test the api.
    • Server output:
      127.0.0.1 - [28/Apr/2019 17:31:54] "GET /employee/testGet HTTP/1.1" 200 
      127.0.0.1 - [28/Apr/2019 17:31:54] "POST /employee/testPost HTTP/1.1" 200 
      127.0.0.1 - [28/Apr/2019 17:31:54] "PUT /employee/testPut HTTP/1.1" 200 
      127.0.0.1 - [28/Apr/2019 17:31:54] "PATCH /employee/testPatch HTTP/1.1" 200 
      127.0.0.1 - [28/Apr/2019 17:31:54] "DELETE /employee/testDelete HTTP/1.1" 200 

Endpoint specification

  • localhost:5000/employee/<employee_name>
    1. This endpoint support the follwonig Http requests:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
    2. This endpoint require a single parameter to be passed <employee_name>.

Note

  • Flask uses port number 5000 as the default port.
  • Each Http request has its own handler, which must be implemented by the developer inside the server.py file.

Built With

  • Python - Python
  • Flask - Web development microframework for Python

Versioning

We use Github for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see LICENSE for details.