{"id":17108306,"url":"https://github.com/u2d-ai/msacrud","last_synced_at":"2025-12-11T20:43:05.547Z","repository":{"id":60147026,"uuid":"541287918","full_name":"u2d-ai/msaCRUD","owner":"u2d-ai","description":"msaCRUD - SQLModel/SQLAlchemy/FastAPI - DB Object CRUD/API Automation Optimized for use with FastAPI/Pydantic. Generates CRUD Router based on SQLModel and SQLAlchemy.","archived":false,"fork":false,"pushed_at":"2022-09-25T19:34:58.000Z","size":96,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T20:06:14.240Z","etag":null,"topics":["api","fastapi","microservices","mkdocs","python3","sqlalchemy","sqlmodel"],"latest_commit_sha":null,"homepage":"","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/u2d-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-25T19:34:34.000Z","updated_at":"2023-09-14T01:03:42.000Z","dependencies_parsed_at":"2022-09-25T21:21:23.790Z","dependency_job_id":null,"html_url":"https://github.com/u2d-ai/msaCRUD","commit_stats":null,"previous_names":["swelcker/msacrud"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u2d-ai%2FmsaCRUD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u2d-ai%2FmsaCRUD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u2d-ai%2FmsaCRUD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u2d-ai%2FmsaCRUD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u2d-ai","download_url":"https://codeload.github.com/u2d-ai/msaCRUD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657855,"owners_count":21140843,"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":["api","fastapi","microservices","mkdocs","python3","sqlalchemy","sqlmodel"],"created_at":"2024-10-14T16:04:59.238Z","updated_at":"2025-12-11T20:43:05.476Z","avatar_url":"https://github.com/u2d-ai.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://logos.u2d.ai/msaCRUD_logo.png?raw=true\" alt=\"msaCRUD Logo\"/\u003e\n\u003c/p\u003e\n\n------\n\u003cp align=\"center\"\u003e\n    \u003cem\u003emsaCRUD - SQLModel/SQLAlchemy/FastAPI - DB Object CRUD/API Automation\u003c/em\u003e\n\u003cbr\u003e\n    Optimized for use with FastAPI/Pydantic. Generates CRUD Router based on SQLModel and SQLAlchemy.\n\u003cbr\u003e\n  \u003ca href=\"https://pypi.org/project/msaCRUD\" target=\"_blank\"\u003e\n      \u003cimg src=\"https://img.shields.io/pypi/v/msaCRUD?color=%2334D058\u0026label=pypi%20package\" alt=\"Package version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/msaCRUD\" target=\"_blank\"\u003e\n      \u003cimg src=\"https://img.shields.io/pypi/pyversions/msaCRUD.svg?color=%2334D058\" alt=\"Supported Python versions\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n------\n\n**Documentation**: \u003ca href=\"https://msaCRUD.u2d.ai/\" target=\"_blank\"\u003emsaCRUD Documentation (https://msaCRUD.u2d.ai/)\u003c/a\u003e\n\n------\n\n## Main Dependencies\n\n- fastapi[all]~=0.85.0 # FastAPI framework, high performance, easy to learn, fast to code, ready for production\n- starlette~=0.20.4 # Starlette is a lightweight ASGI framework/toolkit, which is ideal for building async web services in Python.\n- sqlmodel~=0.0.8 # SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.\n- sqlalchemy[asyncio]~=1.4.41 # Database Abstraction Library\n- sqlalchemy_database~=0.0.7 # SQLAlchemy-Database provides shortcut functions to common database operations for SQLAlchemy ORM\n\n## Usage\n\n```python\nfrom typing import Optional, List\nfrom sqlmodel import SQLModel, Field\nfrom fastapi import FastAPI\nfrom msaCRUD import MSASQLModelCrud\n\n\nclass TestArticle(SQLModel, table=True):\n    __table_args__ = {'extend_existing': True}\n    id: Optional[int] = Field(default=None, primary_key=True, nullable=False)\n    title: str = Field(title='ArticleTitle', max_length=200)\n    description: Optional[str] = Field(default='', title='ArticleDescription', max_length=400)\n    status: bool = Field(None, title='status')\n    content: str = Field(title='ArticleContent')\n\n\nclass TestCategory(SQLModel, table=True):\n    __table_args__ = {'extend_existing': True}\n    id: Optional[int] = Field(default=None, primary_key=True, nullable=False)\n    title: str = Field(title='ArticleTitle', max_length=200)\n    description: Optional[str] = Field(default='', title='ArticleDescription', max_length=400)\n    status: bool = Field(None, title='status')\n    content: str = Field(title='ArticleContent')\n\n\napp = FastAPI()\n\n# create your preferred DB Engine, create the schemas and then you can create the CRUD API models and add the router\n# if you like \n\nnew_crud: MSASQLModelCrud = MSASQLModelCrud(model=TestArticle, engine=YOUR_DB_ENGINE).register_crud()\napp.include_router(new_crud.router)\n\nnew_crud_second: MSASQLModelCrud = MSASQLModelCrud(model=TestCategory, engine=YOUR_DB_ENGINE).register_crud()\napp.include_router(new_crud_second.router)\n\nif __name__ == '__main__':\n    pass\n```\n\n## License Agreement\n\n- `msaCRUD`Based on `MIT` open source and free to use, it is free for commercial use, but please show/list the copyright information about msaCRUD somewhere.\n\n\n## How to create the documentation\n\nWe use mkdocs and mkdocsstring. The code reference and nav entry get's created virtually by the triggered python script /docs/gen_ref_pages.py while ``mkdocs`` ``serve`` or ``build`` is executed.\n\n### Requirements Install for the PDF creation option:\nPDF Export is using mainly weasyprint, if you get some errors here pls. check there documentation. Installation is part of the msaCRUD, so this should be fine.\n\nWe can now test and view our documentation using:\n\n    mkdocs serve\n\nBuild static Site:\n\n    mkdocs build\n\n\n## Build and Publish\n  \nBuild:  \n\n    python setup.py sdist\n\nPublish to pypi:\n\n    twine upload dist/*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu2d-ai%2Fmsacrud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu2d-ai%2Fmsacrud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu2d-ai%2Fmsacrud/lists"}