{"id":13432691,"url":"https://github.com/getmoto/moto","last_synced_at":"2026-03-08T23:02:55.742Z","repository":{"id":7009295,"uuid":"8277372","full_name":"getmoto/moto","owner":"getmoto","description":"A library that allows you to easily mock out tests based on AWS infrastructure.","archived":false,"fork":false,"pushed_at":"2025-05-04T15:05:36.000Z","size":61660,"stargazers_count":7855,"open_issues_count":64,"forks_count":2104,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-05-05T15:52:44.517Z","etag":null,"topics":["aws","boto","ec2","s3"],"latest_commit_sha":null,"homepage":"http://docs.getmoto.org/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getmoto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"getmoto","open_collective":"moto"}},"created_at":"2013-02-18T21:10:59.000Z","updated_at":"2025-05-04T15:05:40.000Z","dependencies_parsed_at":"2023-10-02T09:11:04.171Z","dependency_job_id":"6585b609-0994-4f3c-b4b9-dacdf00e200c","html_url":"https://github.com/getmoto/moto","commit_stats":{"total_commits":7473,"total_committers":1247,"mean_commits":5.992782678428227,"dds":0.8578883982336412,"last_synced_commit":"87fc5279227e994aa780539a8d4f539206c66341"},"previous_names":["spulec/moto"],"tags_count":257,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmoto%2Fmoto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmoto%2Fmoto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmoto%2Fmoto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmoto%2Fmoto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getmoto","download_url":"https://codeload.github.com/getmoto/moto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253587132,"owners_count":21931997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","boto","ec2","s3"],"created_at":"2024-07-31T02:01:15.310Z","updated_at":"2025-12-12T01:04:43.730Z","avatar_url":"https://github.com/getmoto.png","language":"Python","funding_links":["https://github.com/sponsors/getmoto","https://opencollective.com/moto","https://tidelift.com/security"],"categories":["Python","aws"],"sub_categories":[],"readme":"# Moto - Mock AWS Services\n\n[![Join the chat at https://gitter.im/awsmoto/Lobby](https://badges.gitter.im/awsmoto/Lobby.svg)](https://gitter.im/awsmoto/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Build Status](https://github.com/getmoto/moto/workflows/TestNDeploy/badge.svg)](https://github.com/getmoto/moto/actions)\n[![Coverage Status](https://codecov.io/gh/getmoto/moto/branch/master/graph/badge.svg)](https://codecov.io/gh/getmoto/moto)\n[![Docs](https://readthedocs.org/projects/pip/badge/?version=stable)](http://docs.getmoto.org)\n[![PyPI](https://img.shields.io/pypi/v/moto.svg)](https://pypi.org/project/moto/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/moto.svg)](#)\n[![PyPI - Downloads](https://img.shields.io/pypi/dw/moto.svg)](https://pypistats.org/packages/moto)\n[![Code style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Financial Contributors](https://opencollective.com/moto/tiers/badge.svg)](https://opencollective.com/moto)\n\n\n## Install\n\n```console\n$ pip install 'moto[ec2,s3,all]'\n```\n\n## In a nutshell\n\n\nMoto is a library that allows your tests to easily mock out AWS Services.\n\nImagine you have the following python code that you want to test:\n\n```python\nimport boto3\n\n\nclass MyModel:\n    def __init__(self, name, value):\n        self.name = name\n        self.value = value\n\n    def save(self):\n        s3 = boto3.client(\"s3\", region_name=\"us-east-1\")\n        s3.put_object(Bucket=\"mybucket\", Key=self.name, Body=self.value)\n```\n\nTake a minute to think how you would have tested that in the past.\n\nNow see how you could test it with Moto:\n\n```python\nimport boto3\nfrom moto import mock_aws\nfrom mymodule import MyModel\n\n\n@mock_aws\ndef test_my_model_save():\n    conn = boto3.resource(\"s3\", region_name=\"us-east-1\")\n    # We need to create the bucket since this is all in Moto's 'virtual' AWS account\n    conn.create_bucket(Bucket=\"mybucket\")\n    model_instance = MyModel(\"steve\", \"is awesome\")\n    model_instance.save()\n    body = conn.Object(\"mybucket\", \"steve\").get()[\"Body\"].read().decode(\"utf-8\")\n    assert body == \"is awesome\"\n```\n\nWith the decorator wrapping the test, all the calls to s3 are automatically mocked out. The mock keeps track of the state of the buckets and keys.\n\nFor a full list of which services and features are covered, please see our [implementation coverage](https://github.com/getmoto/moto/blob/master/IMPLEMENTATION_COVERAGE.md).\n\n\n### Documentation\nThe full documentation can be found here:\n\n[http://docs.getmoto.org/en/latest/](http://docs.getmoto.org/en/latest/)\n\n\n### Financial Contributions\nSupport this project and its continued development, by sponsoring us!\n\nClick the `Sponsor`-button at the top of the page for more information.\n\nOur finances are managed by OpenCollective, which means you have full visibility into all our contributions and expenses:\nhttps://opencollective.com/moto\n\n### Security contact information\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetmoto%2Fmoto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetmoto%2Fmoto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetmoto%2Fmoto/lists"}