Skip to content

Simple RESTfil API using Flask framework.

License

Notifications You must be signed in to change notification settings

iAlmohaimeed/REST-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple RESTfil API using Flask framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%