{"id":13905757,"url":"https://github.com/ksindi/flask-sqlacodegen","last_synced_at":"2025-04-09T05:02:59.994Z","repository":{"id":15991444,"uuid":"18734623","full_name":"ksindi/flask-sqlacodegen","owner":"ksindi","description":":sake: Automatic model code generator for SQLAlchemy with Flask support","archived":false,"fork":false,"pushed_at":"2024-07-09T17:47:39.000Z","size":119,"stargazers_count":336,"open_issues_count":11,"forks_count":59,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-02T03:14:02.805Z","etag":null,"topics":["flask","flask-sqlacodegen","python","sqlacodegen","sqlalchemy"],"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/ksindi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2014-04-13T17:06:26.000Z","updated_at":"2024-09-20T07:55:12.000Z","dependencies_parsed_at":"2024-06-18T18:36:18.130Z","dependency_job_id":"e8195300-f425-4f12-aa39-c06773387bf9","html_url":"https://github.com/ksindi/flask-sqlacodegen","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksindi%2Fflask-sqlacodegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksindi%2Fflask-sqlacodegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksindi%2Fflask-sqlacodegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksindi%2Fflask-sqlacodegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksindi","download_url":"https://codeload.github.com/ksindi/flask-sqlacodegen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980817,"owners_count":21027803,"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":["flask","flask-sqlacodegen","python","sqlacodegen","sqlalchemy"],"created_at":"2024-08-06T23:01:23.083Z","updated_at":"2025-04-09T05:02:59.974Z","avatar_url":"https://github.com/ksindi.png","language":"Python","readme":"# Flask sqlacodegen\n\nFork of [sqlacodegen](https://pypi.python.org/pypi/sqlacodegen) by Alex Gronholm.\n\nWhat's different:\n\n* Support for Flask-SQLAlchemy syntax using `--flask` option.\n* Defaults to generating backrefs in relationships. `--nobackref` still included as option in case backrefs are not wanted. \n* Naming of backrefs is class name in snake_case (as opposed to CamelCase) and is pluralized if it's Many-to-One or Many-to-Many using [inflect](https://pypi.python.org/pypi/inflect).\n* Primary joins are explicit.\n* If column has a server_default set it to `FetchValue()` instead of trying to determine what that value is. Original code did not set the right server defaults in my setup.\n* `--ignore-cols` ignores special columns when generating association tables. Original code requires all columns to be foreign keys in order to generate association table. Example: `--ignore-cols id,inserted,updated`.\n* Uses the command `flask-sqlacodegen` instead of `sqlacodegen`.\n* Added support for `--notables` to only generate model classes, even for association tables\n\n## Install\n\nWith pip:\n```sh\npip install flask-sqlacodegen\n```\n\nWithout pip:\n```sh\ngit clone https://github.com/ksindi/flask-sqlacodegen.git\ncd flask-sqlacodegen/\npython setup.py install\n```\n\nFor contributing:\n```sh\ngit clone https://github.com/ksindi/flask-sqlacodegen.git\npython -m venv env\npip install -r requirements.txt\npython -m sqlacodegen.main --flask --outfile models.py mysql+pymysql://\u003cusername\u003e:\u003cpassword\u003e@\u003cdatabase-ip\u003e:\u003cport\u003e/\u003cdatabase-name\u003e [--tables \u003ctablenames\u003e] [--notables]\n```\n","funding_links":[],"categories":["HarmonyOS","Python"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksindi%2Fflask-sqlacodegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksindi%2Fflask-sqlacodegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksindi%2Fflask-sqlacodegen/lists"}