Git Product home page Git Product logo

flask_api_starter's Introduction

Flask-APi Starter

Build Status

Flask-APi Starter Template With Application Context and SqlAlchemy

  • Flask Application Context
  • Flask Restfull2 for api endpoints
  • Flask SqlAlchemy
This WireFrame uses a number of open source projects to work properly:
  • Flask - A Micro Web Framework
  • Flask restful - Flask extension for building REST APIs
  • Flask restful Swagger 2 - A Swagger spec extractor for flask-restful
  • Flask CORS - A Flask extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible
  • Python Dotenv - For managing app settings during development and in production
  • Flask-SQLAlchemy - an extension for Flask that adds support for SQLAlchemy

Installation

This app requires python 3.x.x to run.

It is always recommended to use a virtual environment while developing Python applications

Installing Virtual env on Linux.
$ sudo apt-get install python3-pip
$ sudo pip3 install virtualenv
Then create the virtualEnv using
$ virtualenv venv 
$ source venv/bin/activate

Configuration of environments Variables and application

  • Edit the .env file to set environments variables like the database URI and other necessary environment variables (This file is loaded by python-dotenv when the app starts and the environment variables declared in the .env file are available for use in the app)

  • Edit the .flaskenv for the flask app configuration (The .flaskenv file is automatically imported by the flask command)

Then install install Requirements
$ pip install -r requirements.txt 
$ flask run

Navigate to your server address in your preferred browser.

127.0.0.1:5000

App

Other endpoints and customizations can then be added, THIS IS JUST A BASIC BOILERPLATE
Database migrations can also be made
$ flask db init
$ flask db migrate
$ flask db upgrade

Development

Want to contribute? Great!

Feel free to reachout

Todos

  • Implementation of marshmallow (for object serialization/deserialization)
  • Addition of JWT

License

MIT

Free Software, Hell Yeah!

flask_api_starter's People

Contributors

jaywonder20 avatar

Stargazers

 avatar  avatar

Watchers

 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.