{"id":15441985,"url":"https://github.com/andrewthetechie/pydantic-sqs","last_synced_at":"2025-07-15T19:31:17.999Z","repository":{"id":62749605,"uuid":"560194489","full_name":"andrewthetechie/pydantic-sqs","owner":"andrewthetechie","description":"Send and receive Pydantic models with AWS SQS","archived":false,"fork":false,"pushed_at":"2024-04-30T12:30:53.000Z","size":608,"stargazers_count":2,"open_issues_count":24,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-04T00:25:25.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewthetechie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-31T23:59:40.000Z","updated_at":"2024-03-02T06:27:51.000Z","dependencies_parsed_at":"2024-03-17T23:26:59.118Z","dependency_job_id":"4487d467-a860-467d-9439-4b00a54e2daf","html_url":"https://github.com/andrewthetechie/pydantic-sqs","commit_stats":{"total_commits":153,"total_committers":3,"mean_commits":51.0,"dds":0.4248366013071896,"last_synced_commit":"52db704ddca1ddefee2cc3a46f7d211b4f904bb6"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewthetechie%2Fpydantic-sqs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewthetechie%2Fpydantic-sqs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewthetechie%2Fpydantic-sqs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewthetechie%2Fpydantic-sqs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewthetechie","download_url":"https://codeload.github.com/andrewthetechie/pydantic-sqs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226064539,"owners_count":17568034,"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":[],"created_at":"2024-10-01T19:24:44.050Z","updated_at":"2024-11-23T15:48:24.979Z","avatar_url":"https://github.com/andrewthetechie.png","language":"Python","funding_links":[],"categories":["Object Mapping"],"sub_categories":[],"readme":"# pydantic-sqs\n\nConvert your pydantic models to and from AWS SQS messages.\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/andrewthetechie/pydantic-sqs\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/last-commit/andrewthetechie/pydantic-sqs\" alt=\"Latest Commit\"\u003e\n    \u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-green\"\u003e\n    \u003cimg alt=\"GitHub release (latest by date)\" src=\"https://img.shields.io/github/v/release/andrewthetechie/pydantic-sqs?label=Latest%20Release\"\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/andrewthetechie/pydantic-sqs/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/andrewthetechie/pydantic-sqs\" /\u003e\u003c/a\u003e\n    \u003cimg alt=\"GitHub Workflow Status Test and Lint (branch)\" src=\"https://img.shields.io/github/workflow/status/andrewthetechie/pydantic-sqs/Tests/main?label=Tests\"\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://pypi.org/project/pydantic-sqs\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/pypi/v/pydantic-sqs\" alt=\"Package version\"\u003e\n    \u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/pyversions/pydantic-sqs\"\u003e\n\u003c/p\u003e\n\n## Main Dependencies\n\n- [Python +3.7](https://www.python.org)\n- [pydantic](https://github.com/samuelcolvin/pydantic/)\n- [aiobotocore](https://github.com/aio-libs/aiobotocore)\n\n## Getting Started\n\n```python\nfrom pydantic_sqs import SQSModel, SQSQueue\nfrom pydantic import Field\nimport asyncio\nfrom pprint import pprint\nimport os\n\n\nclass ThisModel(SQSModel):\n    foo: str = Field(..., description=\"Foo\")\n\n\nclass ThatModel(SQSModel):\n    bar: str = Field(..., description=\"bar\")\n\n\nasync def main():\n    queue_kwargs = {\n        \"queue_url\": os.environ.get(\"SQS_QUEUE_URL\"),\n        \"endpoint_url\": os.environ.get(\"SQS_ENDPOINT_URL\", None),\n        \"use_ssl\": os.environ.get(\"SQS_USE_SSL\", \"true\").lower() == \"true\",\n    }\n    if queue_kwargs[\"endpoint_url\"] is None:\n        del queue_kwargs[\"endpoint_url\"]\n\n    queue = SQSQueue(**queue_kwargs)\n\n    queue.register_model(ThisModel)\n    queue.register_model(ThatModel)\n\n    this_thing = ThisModel(foo=\"1234\")\n    that_thing = ThatModel(bar=\"5678\")\n    await this_thing.to_sqs()\n    await that_thing.to_sqs()\n\n    new_things = await queue.from_sqs(max_messages=10, wait_time_seconds=90)\n    pprint(new_things)\n    for thing in new_things:\n        await thing.delete_from_queue()\n\n    print(\"deleted all the messages we got from the queue\")\n    pprint(new_things)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Examples\n\nExamples are in the [examples/](./examples) directory of this repo.\n\n### Installation\n\nInstall the package\n\n    pip install pydantic-sqs\n\n## Contributing\n\nContributions are very welcome.\nTo learn more, see the [Contributor Guide](./CONTRIBUTING.rst)\n\n## License\n\nLicensed under the [MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewthetechie%2Fpydantic-sqs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewthetechie%2Fpydantic-sqs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewthetechie%2Fpydantic-sqs/lists"}