Comments (9)
We need to start thinking how to patch botocore
so we can plugging our code using public api, for instance first easy change is to update https://github.com/boto/botocore/blob/develop/botocore/session.py#L108-L109 Session
object to accept ClientCreator
, so in aiobotocore
we just pass AioClientCreator
without coping screen of code.
from aiobotocore.
I do not object, just do not see clean way how to accomplish this. Could be tricky because botocore
also supports python2.7
and aiobotocore
uses yield from
heavily.
from aiobotocore.
perhaps making the aio portion available for python3.x only? I think they do a similar thing with pyzmq: http://pyzmq.readthedocs.org/en/latest/api/zmq.asyncio.html
from aiobotocore.
I see this is being tracked in boto/botocore#458
from aiobotocore.
the best way to handle this issue if client could be somehow abstracted from query/url/headers builder from IO. Nice approach also used here https://github.com/cablehead/python-consul
from aiobotocore.
@jettify an option for abstraction of IO from any code: https://gist.github.com/graingert/ca6cdd5d9ae2e18ca917b4594ac8a633
from aiobotocore.
perhaps we can have a class by class goal of rolling into botocore to make it bite-sized chunks of work. But I think before that we need a high-level strategy defined of how we want this to integrate into botocore to create a straw-man we can work towards and get botocore dev approval on the design.
from aiobotocore.
another option is switching to the c++ library: https://github.com/aws/aws-sdk-cpp this would greatly increase performance as well, mainly due to signing.
from aiobotocore.
The general pattern in botocore is to register components or to hook up callbacks to an event-emitter (which itself could be a component). See
- https://boto3.amazonaws.com/v1/documentation/api/latest/guide/events.html#boto3-specific-events
- the boto3 example shows how to replace the
BaseClient
with a substitute parent class, which could beAioBaseClient
- it also shows how to add custom methods on a client; aiobotocore could add new
async
methods that could be used side-by-side with existing "synchronous" methods rather than replacing those methods (if the botocore API is preserved and extended with new async methods, it might have a better chance of inclusion in botocore) - the boto3 event documentation is better than botocore event documentation, but essentially the same event system is used in botocore and boto3
- moto uses the event system to apply mocks as
before-send
callbacks
In that context, aiobotocore might create and register components for:
- custom event emitter that uses coroutines that can be awaited
- custom client creator and client that can await event callbacks
- custom client event handlers/coroutines that can be awaited
It’s not clear whether this would be any different, in the end, than what aiobotocore is already. This might be an alternative pattern to explore in aiobotocore as a POC, but it’s not clear whether it would work and it’s got little chance, if any, of ever getting merged into botocore (lots of useful PRs are stale on botocore).
from aiobotocore.
Related Issues (20)
- Add link to upstream diff to PR template
- Add new version compatible with airflow 2.5.1 HOT 7
- Aiohttp connection leak
- Support botocore>=1.33.2 HOT 2
- Proxy not working due to signature mismatch HOT 4
- AttributeError: 'S3' object has no attribute 'upload_file'" when calling upload_file on s3 client HOT 2
- S3 Express Session opened for all asyncio calls HOT 4
- 2.10.0 release failed HOT 1
- Support `botocore==1.34.27` HOT 3
- Support for botocore 1.34.33 HOT 1
- Is Session/Client thread or asyncio safe? HOT 3
- Botocore max dependency range HOT 3
- Bump botocore to at least 1.34.40 HOT 5
- support botocore-1.34.53? HOT 3
- Signed urls generated by aiobotocore.signers.AioRequestSigner rejected by AWS HOT 2
- Instance of `StreamingBody` returns `True` for `isinstance` `Iterable` check HOT 4
- Aiobotocore with latest moto server HOT 1
- 2.12.3: pytest fails HOT 2
- 2.12.3: pep517 build and sphinx warnings
- Reusable Initialization of aiobotocore S3 Client 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 aiobotocore.