Giter VIP home page Giter VIP logo

flask-http-server's Introduction

REST API Flask

This project was implemented to implement a quick RESTful API through Flask Framework. No CSS or JS was used to style the Templates as the primary purpose of this project was to implement HTTP Methods efficiently. To store and process data, a JSON file was considered as sample storage and the JSON module is used to handle the methods based on the information passed. The following HTTP Methods were implemented :

1. GET
2. POST
3. PUT
4. PATCH
5. DELETE

It was a skeletal CRUD API processor.

How to setup and run the server?

Before Installing Flask please consider using a Virtual Environment. [ALL COMMANDS ON THIS FILE ARE TO BE EXECUTED ON CLI UNTIL EXPLICITLY MENTIONED OTHERWISE. ] To create a virtual Environment, follow the steps mentioned below :

1. In your Command Line, Make sure your Python can be activated(Add it to your PATH)
2. Create A New Directory as per your working prefernce
3. Outside the working directory execute the following command:
    python -m  venv virtualenv 
4. The requirements have been attached to this project, as requirements.txt
   For your convenience you can run the same requirements or manually install packages using pip 
5. If you are using Windows and are developing your HTTP server:
    Set FLASK_ENV=development
    Set FLASK_APP=app.py
   If you are using Linux/Apple OS:
    Export FLASK_ENV=development
    Export FLASK_APP=app.py
6. Remove the if __name__ == "__main__" part in app.py before running if you want to modify and run.
7.  There are other features in Flask which can be accessed in their docs:   
    Https://flask.palletsprojects.com/en/2.0.x/
7. To run the Flask server:
        Flask run -p <address>:<port> 

flask-http-server's People

Contributors

abhijithganesh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.