Moto-style AWS service mocks for aiobotocore/aioboto3
Project description
aiomoto
aiomoto aims to be Moto for aiobotocore / aioboto3 (plus synchronous botocore / boto3
). Specifically it is supposed to adapter for moto to aiobotocore. I aim to be able to
mock both asynchronous and synchronous service clients with consistent state between
both, i.e. I want you to be able to synchronously write a file to a mock S3 bucket with
boto3 and asynchronously read the same file back again using aioboto3 or aiobotocore.
Motivation
Like many others I've wanted to use Moto with aiobotocore and aioboto3 but found that wasn't supported, see:
The primary motivation for attempting to create an aiomoto repo came from this issue https://github.com/getmoto/moto/issues/8513 which states aiobotocore support is out of scope for moto and the current primary moto maintainer suggested creating an aiomoto repo.
Related Work
https://github.com/dazza-codes/pytest-aiomoto was an earlier attempt at this but not really maintained now.
There is discussion on aiobotocore repo about moto support here https://github.com/aio-libs/aiobotocore/discussions/1300
Both the above approaches as far as I'm aware rely on the Moto's server mode which I don't want to use (mainly as I found server mode was slower than other local AWS services like dynamodb-local in-memory and I also wanted to run tests in parallel without worrying about port clashes or race conditions). In short I don't want any server and I want aiomoto to support the moto like mock contexts in the same thread / process as the tests run in.
Roadmap
This is early days and nothing in aiomoto is functional yet. I'd like to get services I personally use heavily like DynamoDb, S3 and some other more niche services working early. If that all goes well I'd welcome contributors to start adding support for other AWS services I don't personally use. I hope to be able to re-use much of motos automated tests for aiomoto too.
Limitations
I don't plan to support mixing both moto and aiomoto contexts in the same tests, that'd be really complicated to get to sync... however I want aiomoto to be like a super set of moto for the services it does implement. So a aiomoto mock context will patch both boto3 / botocore and aiobotocore / aioboto3. Not sure how complicated this patching is going to be yet but we'll see.
Since aiomoto will be tightly coupled to both aiobotocore and moto for now I intend it to pin both of those dependencies exactly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiomoto-0.0.1.tar.gz.
File metadata
- Download URL: aiomoto-0.0.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c75c8c9af2a988be6a409c341b4b4f81976556983f3da321b9ddd6128f224def
|
|
| MD5 |
8bce8c74a66e778ec3147f549609a6bc
|
|
| BLAKE2b-256 |
628eb04048a0784270e452cd0470621b007aab40767054346a5c84ed9ce5b106
|
File details
Details for the file aiomoto-0.0.1-py3-none-any.whl.
File metadata
- Download URL: aiomoto-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d025c6c3936b6eb057c719ebc234b1dfdbd2cda586397fab341ea43a85f688da
|
|
| MD5 |
602a7241030ecf664ff50c2e9e7982ca
|
|
| BLAKE2b-256 |
71573245e6c9926d03e4b0fdeeafa68e3c139ea812e19f162fccf28818d5bedc
|