Skip to main content

Swagger extension for Eve powered RESTful APIs

Project description

Swagger extension for Eve powered RESTful APIs.

Usage

from eve import Eve
from eve_swagger import swagger

app = Eve()
app.register_blueprint(swagger)

# required. See http://swagger.io/specification/#infoObject for details.
app.config['SWAGGER_INFO'] = {
    'title': 'My Supercool API',
    'version': '1.0',
    'description': 'an API description',
    'termsOfService': 'my terms of service',
    'contact': {
        'name': 'nicola',
        'url': 'http://nicolaiarocci.com'
    },
    'license': {
        'name': 'BSD',
        'url': 'https://github.com/nicolaiarocci/eve-swagger/blob/master/LICENSE',
    }
},

# optional. Will use flask.request.host if missing.
app.config['SWAGGER_HOST'] = 'myhost.com'

if __name__ == '__main__':
    app.run()

When API is up and running, visit the /api-docs endpoint. The resulting JSON can then be used with swagger tooling, like the Swagger Editor:

resources/swagger_editor.png

Installation

$ pip install eve-swagger

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Eve-Swagger-0.0.4.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file Eve-Swagger-0.0.4.tar.gz.

File metadata

  • Download URL: Eve-Swagger-0.0.4.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Eve-Swagger-0.0.4.tar.gz
Algorithm Hash digest
SHA256 266510bfe27afcafd943e72a983802c3a6258c668cd43bc82df683eca880b911
MD5 a4acb928d52e2b0a5743d0006093b873
BLAKE2b-256 0e34443f7b20a1078b9678624f2070ffecc4a2d5c506d64e14742352a20049be

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page