From 2f7c61cf7d684b8acf73975cbe201ba1136c320c Mon Sep 17 00:00:00 2001 From: Uggla Date: Tue, 30 Jun 2015 23:57:23 +0200 Subject: [PATCH] Add docstring examples. --- alexandria/app.py | 9 ++++++++- alexandria/models.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/alexandria/app.py b/alexandria/app.py index b92d848..4d941c5 100644 --- a/alexandria/app.py +++ b/alexandria/app.py @@ -8,12 +8,19 @@ import models import pprint # Initialise Flask -app = Flask(__name__) +app = Flask(__name__) app.debug = False @app.route("/drivers", methods = ["GET"]) def api_drivers(): + """Return drivers. + + :param nome + :type na + :returns: http response + + """ data = {"drivers" : conf_file.get_drivers()} resp = jsonify(data) resp.status_code = 200 diff --git a/alexandria/models.py b/alexandria/models.py index 295590e..9b5801d 100644 --- a/alexandria/models.py +++ b/alexandria/models.py @@ -6,6 +6,7 @@ import os import re class Model(object): + """Implements Alexandria reference model.""" def __init__(self): self.reference_items = []