All Projects → X1Zeth2X → flask-restx-boilerplate

X1Zeth2X / flask-restx-boilerplate

Licence: other
🔥 REST API written in Flask micro web framework with the Flask-RESTX framework.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to flask-restx-boilerplate

Flask Restplus
Fully featured framework for fast, easy and documented API development with Flask
Stars: ✭ 2,585 (+1858.33%)
Mutual labels:  restful, restplus
REST API Test Framework Python
REST API Test Framework example using Python requests and flask for both functional and performance tests.
Stars: ✭ 43 (-67.42%)
Mutual labels:  restful
Tourism Demo
Flutter app backed by Redux, shows animations, internationalization (i18n), ClipPath, fonts and others...
Stars: ✭ 232 (+75.76%)
Mutual labels:  restful
flask-rest-paginate
Pagination Extension for flask-restful
Stars: ✭ 18 (-86.36%)
Mutual labels:  flask-restplus
Clevergo
👅 CleverGo is a lightweight, feature rich and high performance HTTP router for Go.
Stars: ✭ 246 (+86.36%)
Mutual labels:  restful
rest
REST webservices for TYPO3 CMS
Stars: ✭ 78 (-40.91%)
Mutual labels:  restful
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+2040.15%)
Mutual labels:  restful
router
An Fully Automatic RESTful PHP Router
Stars: ✭ 51 (-61.36%)
Mutual labels:  restful
open-rest-es6-boilerplate
open-rest boilerplate project with es6
Stars: ✭ 24 (-81.82%)
Mutual labels:  rest-boilerplate
gorest
RESTful Server Systems [DEPRECATED]
Stars: ✭ 34 (-74.24%)
Mutual labels:  restful
mindsdb server
MindsDB server allows you to consume and expose MindsDB workflows, through http.
Stars: ✭ 3 (-97.73%)
Mutual labels:  flask-restx
Adnc
微服务框架,同时也适用于单体架构系统的开发。支持经典三层与DDD架构开发模式、集成了一系列主流稳定的微服务配套技术栈。一个前后端分离的框架,前端基于Vue、后端基于.Net Core 3.1构建。
Stars: ✭ 223 (+68.94%)
Mutual labels:  restful
go-zero
A cloud-native Go microservices framework with cli tool for productivity.
Stars: ✭ 23,294 (+17546.97%)
Mutual labels:  restful
Jersey 2.x User Guide
Jersey 2.x User Guide《Jersey 2.x 用户指南》 ,中文翻译
Stars: ✭ 235 (+78.03%)
Mutual labels:  restful
express-mysql-demo
基于node.js + express + mysql实现的restful风格的CRUD简单示例
Stars: ✭ 44 (-66.67%)
Mutual labels:  restful
accountbook server
📔 记账本 Django 后端
Stars: ✭ 20 (-84.85%)
Mutual labels:  restful
Http Fake Backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 253 (+91.67%)
Mutual labels:  restful
rails-rest-api
A simple RoR 5 REST API demo with JWT authentication.
Stars: ✭ 25 (-81.06%)
Mutual labels:  restful
tinyspec
Simple syntax for describing REST APIs
Stars: ✭ 95 (-28.03%)
Mutual labels:  restful
premiere
A simple way to consume APIs with Javascript.
Stars: ✭ 67 (-49.24%)
Mutual labels:  restful

Giya

An awesome REST boilerplate that uses Flask-RESTX (formerly Flask-RESTPlus). It has the usual API features to get you started and off the ground, it's also designed to be easily scalable and extendable.

I wrote this boilerplate because I found that a lot of Flask REST boilerplates are either doing too much, is lacking, or it simply doesn't fit my needs.

Features

Flask CLI help command output:

Usage: flask [OPTIONS] COMMAND [ARGS]...

  A general utility script for Flask applications.

  Provides commands from Flask, extensions, and the application. Loads the
  application defined in the FLASK_APP environment variable, or from a
  wsgi.py file. Setting the FLASK_ENV environment variable to 'development'
  will enable debug mode.

    $ export FLASK_APP=giya.py
    $ export FLASK_ENV=development
    $ flask run

Options:
  --version  Show the flask version
  --help     Show this message and exit.

Commands:
  db      Perform database migrations.
  routes  Show the routes for the app.
  run     Run a development server.
  shell   Run a shell in the app context.
  test    Run unit tests

Pre-requisites

This boilerplate uses SQLite as its database, make sure you have it installed. Pipenv is recommended to help manage the dependencies and virtualenv.

You can also use other DBs like PostGreSQL, make sure you have it setup and update your DATABASE_URL in your configs. Read more at Flask-SQLAlchemy's documentations.

It uses Black for code styling/formatting.

Usage

Notes

By default the / route is used by the auth blueprint.

The rest of the resources are found in /api (This is the docs route by default, this can be changed easily).

Note: Pipenv seems to have been becoming unmaintained or unsupported, so virtualenv is recommended to manage your packages and Python environment, hence why requirements.txt has been generated.

Installing with Pipenv

# Clone the repo
$ git clone https://github.com/X1Zeth2X/flask-restx-boilerplate.git

# Install packages with pipenv
$ pipenv install

Running

Please specify your app's environment variables in a .env file, otherwise Flask CLI wouldn't find your app.

# .env file example
export FLASK_APP=giya

# configs: production, testing, development, and default (uses DevelopmentConfig)
export FLASK_CONFIG=development

# Another way of assigning environment variables is:
FLASK_APP=giya
FLASK_CONFIG=development

# Read more at https://github.com/theskumar/python-dotenv
# Enter the virtualenv
$ pipenv shell

# (Optional for development, recommended)
$ flask db init # Initializes a new SQLite database.
$ flask db migrate # Creates the tables in the database.

# Run the app
$ flask run

Unit testing

Giya has already some unit tests written, we encourage adding more unit tests as you scale.

# Unit testing
$ flask test

# Run specific unit test(s)
$ flask test tests.test_auth_api tests.test_user_model ...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].