{"id":16868601,"url":"https://github.com/ahopkins/mayim","last_synced_at":"2025-06-20T10:04:56.405Z","repository":{"id":37928545,"uuid":"493992280","full_name":"ahopkins/mayim","owner":"ahopkins","description":"The *NOT* ORM hydrator","archived":false,"fork":false,"pushed_at":"2024-02-21T02:48:26.000Z","size":469,"stargazers_count":110,"open_issues_count":11,"forks_count":9,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-06-09T08:55:04.608Z","etag":null,"topics":["asyncio","hydrator","orm","postgres","python"],"latest_commit_sha":null,"homepage":"https://ahopkins.github.io/mayim/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahopkins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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},"funding":{"github":["ahopkins"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-05-19T08:50:38.000Z","updated_at":"2025-05-30T14:45:31.000Z","dependencies_parsed_at":"2024-10-26T21:16:54.591Z","dependency_job_id":"a02806b9-4d15-4ae6-b374-242bcda944f5","html_url":"https://github.com/ahopkins/mayim","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ahopkins/mayim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahopkins%2Fmayim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahopkins%2Fmayim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahopkins%2Fmayim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahopkins%2Fmayim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahopkins","download_url":"https://codeload.github.com/ahopkins/mayim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahopkins%2Fmayim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260924299,"owners_count":23083522,"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":["asyncio","hydrator","orm","postgres","python"],"created_at":"2024-10-13T14:58:55.105Z","updated_at":"2025-06-20T10:04:51.395Z","avatar_url":"https://github.com/ahopkins.png","language":"Python","funding_links":["https://github.com/sponsors/ahopkins"],"categories":[],"sub_categories":[],"readme":"# Mayim\n\n\u003e The *NOT* ORM Python hydrator\n\n**What is Mayim?**\n\nThe simplest way to describe it would be to call it a **one-way ORM**. That is to say that it does *not* craft SQL statements for you. Think of it as **BYOQ** (Bring Your Own Query).\n\n**Why?**\n\nI have nothing against ORMs, truthfully. They serve a great purpose and can be the right tool for the job in many situations. I just prefer not to use them where possible. Instead, I would rather have control of my SQL statements.\n\nThe typical tradeoff though is that there is more work needed to hydrate from SQL queries to objects. Mayim aims to solve that.\n\n## Getting Started\n\n```\npip install mayim[postgres]\n```\n\n```python\nimport asyncio\nfrom typing import List\nfrom mayim import Mayim, PostgresExecutor, sql\nfrom dataclasses import dataclass\n\n@dataclass\nclass Person:\n    name: str\n\nclass PersonExecutor(PostgresExecutor):\n    @sql(\"SELECT * FROM people LIMIT $limit OFFSET $offset\")\n    async def select_all_people(\n        self, limit: int = 4, offset: int = 0\n    ) -\u003e List[Person]:\n        ...\n\nasync def run():\n    executor = PersonExecutor()\n    Mayim(dsn=\"postgres://...\")\n    print(await executor.select_all_people())\n\n\nasyncio.run(run())\n```\n\n## Documentation\n\nThe docs: [ahopkins.github.io/mayim](https://ahopkins.github.io/mayim/guide/)\n\n## Framework support\n\nOut of the box, Mayim comes with extensions to support Quart, Sanic, and Starlette applications. Checkout the docs for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahopkins%2Fmayim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahopkins%2Fmayim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahopkins%2Fmayim/lists"}