Generates documentation for Eve APIs
Python Erlang
Latest commit 9b972db Nov 21, 2014 @charlesflynn Merge pull request #16 from heath/master
config.py is python3 compatible now
Permalink
Failed to load latest commit information.
eve_docs remove trailing white space Nov 3, 2014
.gitignore Initial commit May 30, 2013
AUTHORS add Olivier Jun 12, 2014
LICENSE added license Jun 12, 2013
MANIFEST.in prep for PyPI Apr 23, 2014
README.rst prep for PyPI Apr 23, 2014
example.py initial import May 30, 2013
requirements.txt added requirements.txt May 31, 2013
settings.py initial import May 30, 2013
setup.py bump version May 6, 2014

README.rst

Eve-docs

A blueprint that generates documentation for Eve APIs in HTML and JSON formats. Eve-docs creates the documentation from your existing Eve configuration file, with no additional configuration required.

Installation

Clone this repo into your Eve application and modify your launch script to activate the blueprints:

from flask.ext.bootstrap import Bootstrap
from eve_docs import eve_docs
...
Bootstrap(app)
app.register_blueprint(eve_docs, url_prefix='/docs')

After restarting, documentation is availabile at the url_prefix defined in your launch script. example.py shows how to do this using the launch script from Nicola Iarocci's eve-demo repo.

HTML output

The HTML documentation is produced using the Flask-Bootstrap blueprint. Expand each domain to show available endpoint methods, and further expand each method to show parameter details. A screenshot with one method expanded follows, and you can also view a fully expanded example. Sample output

JSON output

Documentation is also exposed as JSON at url_prefix/spec.json for programmatic consumption. Example output:

{
  "base": "http://localhost:5000",
  "domains": {
    "people": {
      "/people/{_id}": {
        "GET": {
          "label": "Retrieve a person",
          "params": [
            {
              "name": "_id",
              "type": "string",
              "required": true
            }
          ]
          ...

License

Released under the MIT License.