Comments (2)
Oh, I was actually thinking of keeping two clients, but allowing them to share the same resources.
Something like this:
resources = bravado.build_resources(url)
async_client = bravado.SwaggerClient(resources, http_client=AsyncClient())
sync_client = bravado.SwaggerClient(resources, http_client=SyncClient())
I think this is pretty close to the current interface, but I'm not sure if we expose build_resources()
right now.
from bravado.
Yea, I thought you might be. That seems fine to me, too. My thinking was that this would make it easier for a function that takes a client to switch between using sync or async if it needed to change the number of requests it's making. With your implementation it would require the caller to change it, which seems unnecessary. I don't love the client.async and client.sync interface, but I couldn't think of anything else.
from bravado.
Related Issues (20)
- Can not pass a parameter whose name is python keyword HOT 2
- cannot create SwaggerClient from https URL HOT 1
- Bravado fails to parse Security Definitions in OSS projects HOT 1
- Bravado should not silently follow redirects HOT 3
- autodoc-generated documentation failing to render HOT 1
- RPM Packaging HOT 1
- Plans for an async-native version of Bravado? HOT 1
- Redirects should not be considered errors
- Content-Type in swagger spec is ignored HOT 1
- Question: How to increase connection pool? HOT 2
- SwaggerClient.from_url should have timeout HOT 2
- follow_redirects config option seems to have no effect HOT 2
- ValueError: Duplicate model found HOT 2
- Is SSL two-way authentication supported?
- OverflowError: timeout value is too large HOT 1
- Implement serialization protocol in SwaggerClient class? HOT 2
- Severe performance degradation in uWSGI preforking mode starting from v10.1.0 HOT 2
- Nanosecond datetime precision lost when SwaggerClient parses it HOT 1
- jsonschema 4.0.0 removes `compat` module HOT 6
- bravado.exception.HPPTFound 302 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bravado.