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.
If you haven't already installed Cookie Cutter then you'll need to do that first.
pip install cookiecutter
or read their documentation here.
Run the following commands to create a new project using the Arrested cookiecutter.
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
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
The example ships with a Docker container. Read more about Installing. and Running. Docker.
docker-compose up api
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
Get started with Flask-Arrested using the quickstart user guide or take a look at the in-depth API documentation.