Skip to content

mikeywaites/arrested-cookiecutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arrested Cookie Cutter

https://badges.gitter.im/bruv-io/Arrested.png

This is a cookie-cutter for Arrested. - A Framework for rapidly building REST APIs with Flask. This cookie-cutter creates a Flask application that exposes a User API to help demonstrate how to use the different components of Arrested.

Installation

If you haven't already installed Cookie Cutter then you'll need to do that first.

pip install cookiecutter

or read their documentation here.

🚀 Get started in under a minute..

Run the following commands to create a new project using the Arrested cookiecutter.

Step 1

Clone the project repo using cookiecutter (run cookiecutter --help for more options when creating the project)

cookiecutter gh:mikeywaites/arrested-cookiecutter -o arrested-users-api

Step 2

Change to the newly created directory.

cd arrested-users-api

The directory should look something like this.

.
└── arrested-users-api
    ├── Dockerfile
    ├── README.rst
    ├── arrested_users
    │   ├── __init__.py
    │   ├── apis
    │   │   ├── __init__.py
    │   │   └── v1
    │   │       ├── __init__.py
    │   │       ├── mappers
    │   │       │   ├── __init__.py
    │   │       │   ├── base.py
    │   │       │   └── user.py
    │   │       ├── middleware.py
    │   │       └── users.py
    │   ├── app.py
    │   ├── config.py
    │   ├── migrations
    │   │   ├── 266926b5775b_initial_migration.py
    │   │   └── script.py.mako
    │   ├── models
    │   │   ├── __init__.py
    │   │   ├── base.py
    │   │   └── user.py
    │   └── wsgi.py
    ├── arrested_users.db
    ├── docker-compose.yml
    ├── requirements.txt
    └── setup.py

7 directories, 22 files

Step 3

The example ships with a Docker container. Read more about Installing. and Running. Docker.

docker-compose up api

Step 4

Fire a HTTP request at the Users endpoint of your newly created API.

curl -u admin:secret localhost:8080/v1/users | python -m json.tool

The User Guide

Get started with Flask-Arrested using the quickstart user guide or take a look at the in-depth API documentation.

https://arrested.readthedocs.org.