Giter Club home page Giter Club logo

flask_options_example_website's Introduction

Flask Options Example Website

Example website that uses the associated example HTTP API to access the Liquid Options Client.

This is an example front end and can be replaced with any front end that can make API calls including JavaScript etc.

Nothing goes in here apart from calls to the API and displaying returned data - all saves to dtabase or calls to other APIs etc should go in the API that serves this website.

It is not intended to be an example of how to deliver a brilliant Flask API - so pardon any bad practices ;-)

Example Website

New Option

Option Actions

Option Actions

Option List

How to Run

virtualenv -p python3 venv

source venv/bin/activate

pip install -r requirements.txt

To run the website (the API will use its own port so you can set the port to anything but the API port):

flask run --port <port-here>

As the flask_template_api uses port 5001 we'll use 5000:

flask run --port 5000

Then visit the local site at http://127.0.0.1:5000

PLEASE NOTE A LOT OF THE CSS AND IMAGES ETC CAN BE CLEARED OUT - THEY HAVE NOT BEEN CLEANED AND WILL CONTAIN REDUNDANT ELEMENTS

Developer Reference

If you are using Visual Studio Code you can use the following as the launch.json within .vscode and then step through the code and add breakpoints etc:

{
    "name": "Python: Flask",
    "type": "python",
    "request": "launch",
    "module": "flask",
    "env": {
        "FLASK_APP": "app.py",
        "FLASK_DEBUG": "0"
    },
    "args": [
        "run",
        "--no-debugger",
        "--no-reload",
        "--port",
        "5000"
    ],
    "jinja": true,
    "configurations": [
        {
            "name": "Python: Flask",
            "type": "python",
            "request": "launch",
            "module": "flask",
            "env": {
                "FLASK_APP": "app.py",
                "FLASK_DEBUG": "1"
            },
            "args": [
                "run",
                "--no-debugger",
                "--port",
                "5000"
            ],
            "jinja": true
        }
    ],
}

flask_options_example_website's People

Contributors

wintercooled avatar

Stargazers

22388o⚡️  avatar

Watchers

 avatar

Forkers

22388o

flask_options_example_website's Issues

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.