GithubHelp home page GithubHelp logo

flask_blueprint_demo's Introduction

Flask Blueprint Demo

An Demo for flask blueprint.

Set Up

  1. Clone the repository: git clone https://github.com/hyuyu1544/flask_blueprint_demo.git

  2. Prepare you develop environ. (e.g.venv,pyenv)

  3. Install pkg the app needs pip install -r requirements.txt

  4. Run flask app server: python -m server

  5. Go check on browser:

http://127.0.0.1:5000/blueprint1/blueprint1_api
http://127.0.0.1:5000/blueprint2/blueprint2_api

The Tree

flask_blueprint_demo
├── README.md
├── requirements.txt
└── server
    ├── __init__.py
    ├── __main__.py
    ├── app.py
    ├── blueprint1
    │   ├── __init__.py
    │   └── view
    │       ├── __init__.py
    │       └── blueprint1_api.py
    └── blueprint2
        ├── __init__.py
        └── view
            ├── __init__.py
            └── blueprint2_api.py

app.py

The main application is defination here. Developer can add many blueprint here by using register_blueprint, and using url_prefix to setting blueprint prefix url.

blueprint1/init.py

Blueprint route here.

flask_blueprint_demo's People

Contributors

hyuyu1544 avatar

Watchers

James Cloos avatar  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.