-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type annotations #255
Comments
The author of boto3-stubs must be stalking me ;) This update was posted there 10 hours later: https://github.com/vemel/mypy_boto3_builder/issues/4#issuecomment-1028776360 |
So, I am working on import aioboto3
from types_aiobotocore_s3.client import S3Client
from types_aiobotocore_s3.service_resource import S3ServiceResource
session = aioboto3.Session()
async with session.client("s3") as s3_client:
s3_client: S3Client # now s3_client should have auto-complete and type checking
async with session.resource("s3") as s3_resource:
s3_resource: S3ServiceResource # resource as well Please let me know if you are interested. I can create stubs for |
Yes, this sounds absolutely great. Thank you. |
Once I get approval, I am going to publish all the packages. Everything works great already, I just need to add integration tests and setup automated builds (not sure if we really need them, as |
I did not yet create documentation specifically for |
Hey, feel free :) |
Let me know when you've got something in pypi and i'll add something to the readme |
Hello! I already have types-aiobotocore on PyPI. I can provide a short example how to use it with aioboto3 |
One usability issue - I am using with strict MyPy and unfortunately the
The auto-complete and type checking workaround from above do work well for autocompletion but they also require a async with self.boto_session.client("s3") as s3:
s3: S3Client # type: ignore[no-redef] |
Ah ha! I fixed my async with self.boto_session.client("s3") as s3: # type: S3Client
s3.upload_fileobj(...) I still have the issue with the @vemel what do you think? |
@phillipuniverse This one fix the issue: youtype/mypy_boto3_builder#153 (comment) |
Are there plans to add type system?
While boto3 does not have type annotations, there is a package called boto3-stubs which provides type information making it more enjoyable to program in IDE.
Any plans for aioboto3, to include type annotations?
The text was updated successfully, but these errors were encountered: