{"id":15046119,"url":"https://github.com/jedymatt/sqlalchemyseed","last_synced_at":"2025-10-26T02:31:15.713Z","repository":{"id":38110631,"uuid":"378644186","full_name":"jedymatt/sqlalchemyseed","owner":"jedymatt","description":"SQLAlchemy Seeder","archived":false,"fork":false,"pushed_at":"2023-03-12T03:47:34.000Z","size":379,"stargazers_count":14,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T13:43:40.004Z","etag":null,"topics":["csv","json","orm","python","seed","seeder","sqlalchemy","sqlalchemy-orm","sqlalchemy-python","yaml"],"latest_commit_sha":null,"homepage":"https://sqlalchemyseed.readthedocs.io/","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/jedymatt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-20T12:49:43.000Z","updated_at":"2023-12-02T12:03:00.000Z","dependencies_parsed_at":"2022-07-08T01:40:40.169Z","dependency_job_id":null,"html_url":"https://github.com/jedymatt/sqlalchemyseed","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedymatt%2Fsqlalchemyseed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedymatt%2Fsqlalchemyseed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedymatt%2Fsqlalchemyseed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedymatt%2Fsqlalchemyseed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedymatt","download_url":"https://codeload.github.com/jedymatt/sqlalchemyseed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238247984,"owners_count":19440879,"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":["csv","json","orm","python","seed","seeder","sqlalchemy","sqlalchemy-orm","sqlalchemy-python","yaml"],"created_at":"2024-09-24T20:52:44.031Z","updated_at":"2025-10-26T02:31:15.352Z","avatar_url":"https://github.com/jedymatt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqlalchemyseed\n\n[![PyPI](https://img.shields.io/pypi/v/sqlalchemyseed)](https://pypi.org/project/sqlalchemyseed)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sqlalchemyseed)](https://pypi.org/project/sqlalchemyseed)\n[![PyPI - License](https://img.shields.io/pypi/l/sqlalchemyseed)](https://github.com/jedymatt/sqlalchemyseed/blob/main/LICENSE)\n[![Python package](https://github.com/jedymatt/sqlalchemyseed/actions/workflows/python-package.yml/badge.svg)](https://github.com/jedymatt/sqlalchemyseed/actions/workflows/python-package.yml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/2ca97c98929b614658ea/maintainability)](https://codeclimate.com/github/jedymatt/sqlalchemyseed/maintainability)\n[![codecov](https://codecov.io/gh/jedymatt/sqlalchemyseed/branch/main/graph/badge.svg?token=W03MFZ2FAG)](https://codecov.io/gh/jedymatt/sqlalchemyseed)\n[![Documentation Status](https://readthedocs.org/projects/sqlalchemyseed/badge/?version=latest)](https://sqlalchemyseed.readthedocs.io/en/latest/?badge=latest)\n\nSqlalchemy seeder that supports nested relationships.\n\nSupported file types\n\n- json\n- yaml\n- csv\n\n## Installation\n\nDefault installation\n\n```shell\npip install sqlalchemyseed\n```\n\n## Quickstart\n\nmain.py\n\n```python\nfrom sqlalchemyseed import load_entities_from_json\nfrom sqlalchemyseed import Seeder\nfrom db import session\n\n# load entities\nentities = load_entities_from_json('data.json')\n\n# Initializing Seeder\nseeder = Seeder(session)\n\n# Seeding\nseeder.seed(entities)\n\n# Committing\nsession.commit()  # or seeder.session.commit()\n```\n\ndata.json\n\n```json\n{\n    \"model\": \"models.Person\",\n    \"data\": [\n        {\n            \"name\": \"John March\",\n            \"age\": 23\n        },\n        {\n            \"name\": \"Juan Dela Cruz\",\n            \"age\": 21\n        }\n    ]\n}\n```\n\n## Documentation\n\n\u003chttps://sqlalchemyseed.readthedocs.io/\u003e\n\n## Found Bug?\n\nReport here in this link:\n\u003chttps://github.com/jedymatt/sqlalchemyseed/issues\u003e\n\n## Want to contribute?\n\nFirst, Clone this [repository](https://github.com/jedymatt/sqlalchemyseed).\n\n### Install dev dependencies\n\nInside the folder, paste this in the terminal to install necessary dependencies:\n\n```shell\npip install -r requirements.txt -r docs/requirements.txt\n```\n\nNote: make sure you have the virtual environment and enabled, or if you are using vs code and docker then you can simply re-open this as container.\n\n### Run tests\n\nBefore running tests, make sure that the package is installed as editable:\n\n```shell\npython setup.py develop --user\n```\n\nThen run the test:\n\n```shell\npytest tests\n```\n\nRun test with coverage\n\n```shell\ncoverage run -m pytest\n```\n\nAutobuild documentation\n\n```shell\nsphinx-autobuild docs docs/_build/html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedymatt%2Fsqlalchemyseed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedymatt%2Fsqlalchemyseed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedymatt%2Fsqlalchemyseed/lists"}