Skip to content

ChrisRunyon/python_rest_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python restful api

Summary:

Don't over-engineer your app.

This Python REST API is a game called Mastermind. The goal is simple; try to guess the correct sequence using the colors: 'RED', 'ORANGE', 'YELLOW', 'GREEN', 'BLUE', 'PURPLE', 'WHITE', 'BLACK'.

Dependencies:

You will need Python 2.7, Flask, Flask-RESTful

Recommended reading:

Everything here can be found in the documentation provided.

https://www.python.org/
http://flask.pocoo.org/
https://pypi.python.org/pypi/Flask-RESTful

Usage:

Install Python 2.7, Flask, and Flask-Restful. Once installed use the command line to start.

RUN:

	python app.py

Your server should now be running at http://localhost:5000

The AI will generate a sequence that is written to a file called 'secretcode'. This file contains the answer.

The REST API has three endpoints.

TEST:

http://localhost:5000/test Use this to test that your server is working correctly.

START:

http://localhost:5000/start Use this to have the AI generate the answer.

GUESS:

http://localhost:5000/guess Use this to guess the correct sequence.

About

Python REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages