Skip to content

capless/swaggyp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swaggyp

Python library for generating Swagger API templates

Install

pip install swaggyp

Example

import swaggyp as sw

info = sw.Info(title='Capless',description='Test site',version='dev')
rsp = sw.Response(status_code=200,description='test')
op = sw.Operation(http_method='GET',summary='Test',description='test',responses=[rsp])
p = sw.Path(endpoint='/dev/',operations=[op])
t = sw.SwaggerTemplate(host='capless.io',basePath='/',info=info,paths=[p],schemes=['https'])

>>t.to_yaml()
basePath: /
host: capless.io
info:
  description: Test site
  title: Capless
  version: dev
paths:
  /dev/:
    GET:
      description: test
      responses:
        '200':
          description: test
      summary: Test
schemes:
- https
swagger: '2.0'

About

Python library for generating Swagger API templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages