{"repo":"jedymatt/sqlalchemyseed","free":true,"listed":false,"github":"https://github.com/jedymatt/sqlalchemyseed","clone":"git clone https://github.com/jedymatt/sqlalchemyseed.git","description":"SQLAlchemy Seeder","language":"Python","stars":15,"topics":["sqlalchemy-python","sqlalchemy","sqlalchemy-orm","seeder","python","seed","orm","json","yaml","csv"],"license":"MIT","category":"databases-storage","readme_excerpt":"sqlalchemyseed Sqlalchemy seeder that supports nested relationships. Supported file types - json - yaml - csv Installation Default installation Quickstart main.py data.json Works with SQLModel & FastAPI A SQLModel table=True class is a SQLAlchemy model, so sqlalchemyseed works with SQLModel and FastAPI out of the box — same seed files, same seeders, verified in CI: Seed at app startup, in tests via the bundled pytest plugin, or from the CLI — see the FastAPI & SQLModel docs. Editor validation (JSON Schema) A JSON Schema for seed files ships with the package and lives in the repo at src/sqlalchemyseed/res/schema.json . Point your editor at it to get autocomplete and inline validation as you write fixtures. In the URLs below, replace v2.6.0 with the version of sqlalchemyseed you have installed, so the editor validates against the same rules as your runtime. For YAML files, add a modeline as the first line: For JSON files (which can't carry a modeline), associate the schema by glob in your editor settings, e.g. VS Code .vscode/settings.json : The schema covers the full format including the ! relationship prefix; the filter key it allows is only honored by HybridSeeder . Command-line usage Seed a database directly from data files without writing Python: The command accepts one or more files and/or directories (a directory seeds every .json / .yaml / .yml file inside it, in sorted order): The database URL may be passed with --url or the DATABASE URL environment variable. Model pat","default_branch":null,"files":null,"tree":[],"storefront":"/r/jedymatt","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jedymatt/sqlalchemyseed/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}