All Projects → Yelp → Bravado

Yelp / Bravado

Licence: other
Bravado is a python client library for Swagger 2.0 services

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Bravado

Go Restful
package for building REST-style Web Services using Go
Stars: ✭ 4,310 (+669.64%)
Mutual labels:  openapi
Studio
The modern editor for API Design and Technical Writing.
Stars: ✭ 459 (-18.04%)
Mutual labels:  openapi
Create Openapi Repo
🤖 Generator for GH repo to help you manage the OpenAPI definition lifecycle
Stars: ✭ 513 (-8.39%)
Mutual labels:  openapi
Sanic Openapi
Easily document your Sanic API with a UI
Stars: ✭ 447 (-20.18%)
Mutual labels:  openapi
Openapi Specification
The OpenAPI Specification Repository
Stars: ✭ 22,603 (+3936.25%)
Mutual labels:  openapi
Awesome Openapi3
😎 A list of awesome projects related to OpenAPI 3.0.x, curated by the community
Stars: ✭ 469 (-16.25%)
Mutual labels:  openapi
Swag
Automatically generate RESTful API documentation with Swagger 2.0 for Go.
Stars: ✭ 5,173 (+823.75%)
Mutual labels:  openapi
Generator Express No Stress
🚂 A Yeoman generator for Express.js based 12-factor apps and apis
Stars: ✭ 534 (-4.64%)
Mutual labels:  openapi
Nirvana
Golang Restful API Framework for Productivity
Stars: ✭ 460 (-17.86%)
Mutual labels:  openapi
Quick Cocos2dx Community
Cocos2d-Lua 社区版
Stars: ✭ 504 (-10%)
Mutual labels:  openapi
Goa
Design-based APIs and microservices in Go
Stars: ✭ 4,493 (+702.32%)
Mutual labels:  openapi
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+3699.82%)
Mutual labels:  openapi
Datafire
A framework for building integrations and APIs
Stars: ✭ 487 (-13.04%)
Mutual labels:  openapi
Express Openapi Validator
🦋 Auto-validates api requests, responses, and securities using ExpressJS and an OpenAPI 3.x specification
Stars: ✭ 436 (-22.14%)
Mutual labels:  openapi
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (-7.86%)
Mutual labels:  openapi
Shuffle
Shuffle: A general purpose security automation platform platform. We focus on accessibility for all.
Stars: ✭ 424 (-24.29%)
Mutual labels:  openapi
Swagger Parser
Swagger Spec to Java POJOs
Stars: ✭ 468 (-16.43%)
Mutual labels:  openapi
Swagger Express Middleware
Swagger 2.0 middlware and mocks for Express.js
Stars: ✭ 543 (-3.04%)
Mutual labels:  openapi
Apisprout
Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation
Stars: ✭ 519 (-7.32%)
Mutual labels:  openapi
Open Api
A Monorepo of various packages to power OpenAPI in node
Stars: ✭ 497 (-11.25%)
Mutual labels:  openapi

.. image:: https://img.shields.io/travis/Yelp/bravado.svg :target: https://travis-ci.org/Yelp/bravado?branch=master

.. image:: https://img.shields.io/coveralls/Yelp/bravado.svg :target: https://coveralls.io/r/Yelp/bravado

.. image:: https://img.shields.io/pypi/v/bravado.svg :target: https://pypi.python.org/pypi/bravado/ :alt: PyPi version

.. image:: https://img.shields.io/pypi/pyversions/bravado.svg :target: https://pypi.python.org/pypi/bravado/ :alt: Supported Python versions

Bravado

About

Bravado is a Yelp maintained fork of digium/swagger-py <https://github.com/digium/swagger-py/>__ for use with OpenAPI Specification version 2.0 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>__ (previously known as Swagger).

From the OpenAPI Specification project:

The goal of The OpenAPI Specification is to define a standard,
language-agnostic interface to REST APIs which allows both humans and
computers to discover and understand the capabilities of the service
without access to source code, documentation, or through network traffic
inspection.

Client libraries can automatically be generated from the OpenAPI specification, however Bravado aims to be a complete replacement for code generation (swagger-codegen <https://github.com/wordnik/swagger-codegen>__).

Example Usage

.. code-block:: Python

from bravado.client import SwaggerClient
client = SwaggerClient.from_url('http://petstore.swagger.io/v2/swagger.json')
pet = client.pet.getPetById(petId=1).response().result

Example with Basic Authentication

.. code-block:: python

from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient

http_client = RequestsClient()
http_client.set_basic_auth(
    'api.yourhost.com',
    'username', 'password'
)
client = SwaggerClient.from_url(
    'http://petstore.swagger.io/v2/swagger.json',
    http_client=http_client,
)
pet = client.pet.getPetById(petId=1).response().result

Example with Header Authentication

.. code-block:: python

from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient

http_client = RequestsClient()
http_client.set_api_key(
    'api.yourhost.com', 'token',
    param_name='api_key', param_in='header'
)
client = SwaggerClient.from_url(
    'http://petstore.swagger.io/v2/swagger.json',
    http_client=http_client,
)
pet = client.pet.getPetById(petId=1).response().result

Example with Fido Client (Async Http Client)

.. code-block:: python

# Install bravado with fido extra (``pip install bravado[fido]``)
from bravado.fido_client import FidoClient
from bravado.client import SwaggerClient

http_client = FidoClient()
client = SwaggerClient.from_url(
    'http://petstore.swagger.io/v2/swagger.json',
    http_client=http_client,
)
pet = client.pet.getPetById(petId=1).response().result

Documentation

More documentation is available at http://bravado.readthedocs.org

Installation

.. code-block:: bash

# To install bravado with Synchronous Http Client only.
$ pip install bravado

# To install bravado with Synchronous and Asynchronous Http Client (RequestsClient and FidoClient).
$ pip install bravado[fido]

Development

Code is documented using Sphinx <http://sphinx-doc.org/>__.

virtualenv <https://virtualenv.readthedocs.io/en/latest/>__. is recommended to keep dependencies and libraries isolated.

Setup

.. code-block:: bash

# Run tests
tox

# Install git pre-commit hooks
tox -e pre-commit install

Contributing

  1. Fork it ( http://github.com/Yelp/bravado/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add your modifications
  4. Commit your changes (git commit -m "Add some feature")
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

Releasing a new version (Yelpers only)

See https://yelpwiki.yelpcorp.com/pages/viewpage.action?pageId=19022447

License

Copyright (c) 2013, Digium, Inc. All rights reserved. Copyright (c) 2014-2021, Yelp, Inc. All rights reserved.

Bravado is licensed with a BSD 3-Clause License <http://opensource.org/licenses/BSD-3-Clause>__.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].