Eve-docs-0.1.4
توضیحات
Generates documentation for Eve APIs
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | Eve-docs-0.1.4 |
| نام | Eve-docs |
| نسخه کتابخانه | 0.1.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Charles Flynn |
| ایمیل نویسنده | git@irab.org |
| آدرس صفحه اصلی | https://github.com/charlesflynn/eve-docs |
| آدرس اینترنتی | https://pypi.org/project/Eve-docs/ |
| مجوز | The MIT License Copyright (c) 2013 Charles Flynn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Eve-docs
========
A blueprint that generates documentation for
`Eve <https://github.com/nicolaiarocci/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 <https://github.com/nicolaiarocci/eve-demo>`__ repo.
HTML output
~~~~~~~~~~~
The HTML documentation is produced using the
`Flask-Bootstrap <https://github.com/mbr/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 <http://charonex.com/img/evedocs-example2.png>`__. |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 <http://www.opensource.org/licenses/MIT>`__.
.. |Sample output| image:: http://charonex.com/img/evedocs-example.png
نحوه نصب
نصب پکیج whl Eve-docs-0.1.4:
pip install Eve-docs-0.1.4.whl
نصب پکیج tar.gz Eve-docs-0.1.4:
pip install Eve-docs-0.1.4.tar.gz