gdsrosa / todos-api

The purpose of this repo is to apply RESTful API concepts with a TODO app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TODOs API

Maintainability Build Status

The goal of this repository is to show how to implement a simple RESTful using Django.

Endpoints

Below you'll find a table with the current endpoints implemented:

Endpoint Supported methods Description
/todos GET Get list of ToDo items

Contributing

Getting started

  • Fork this repository to your GitHub account by clicking the Fork button.
  • Clone the main repository locally:
$ git clone https://github.com/gdsrosa/todos-api
  • Add your fork as a remote to push your work to. Replace {username} with your username. This names the remote "fork", the default remote is "origin".
$ git remote add fork https://github.com/<username>/todos-api
  • Create a virtualenv.
$ python3 -m venv env/
  • Install the development dependencies
$ pip install -r requirements.txt

Start coding

Create a branch for what you would like to work on. Always branch off master to get the latest changes.

$ git fetch origin
$ git checkout -b your-branch-name origin/master

Using your favorite editor, make your changes, committing as you go.

Make sure to include tests that cover any code changes you make. Run the tests as described below.

Push your commits to your fork on GitHub and create a pull request.

$ git push --set-upstream fork your-branch-name

Running tests

$ python manage.py test todos

Running the app

Docker Compose

This application is dockerized and it's managed by Docker Compose. See docker-compose.yml.

Prerequisites

Install Docker for your OS.

Starting the app

First build the web and db containers:

$ docker-compose build web db

Then, you can start the app:

$ docker-compose up

About

The purpose of this repo is to apply RESTful API concepts with a TODO app

License:MIT License


Languages

Language:Python 98.1%Language:Dockerfile 1.9%