Skip to main content

Esay way to create and run seeds in your projects

Project description

🚀 FastSeeder

FastSeeder is a lightweight, plug-and-play seed manager for Python projects using SQLAlchemy as ORM.
It allows you to create, organize, and run database seeds in a clean and consistent way — across any environment.


✨ What does it do?

  • ✅ Automatically creates seeds in a structured format
  • ✅ Executes seeds that haven't been run yet
  • ✅ Tracks seed history to avoid duplicates
  • ✅ Uses SQLAlchemy to run raw SQL or ORM logic
  • ✅ Works out-of-the-box with .env or via secret managers like GCP Secret Manager

🧠 Who is this for?

This tool is built for developers using SQLAlchemy who want a simple, extensible way to manage database seed logic in any Python application.


🏗️ Folder structure

By default, FastSeeder creates your seeds in:

database/
└── seeds/
    └── YYYY-MM-DD-HH:MM:SS-seed-name.py

You can change this location by setting the environment variable:

SEED_LOCATION=your/custom/path

⚙️ Environment variables

Variable Description
DATABASE_URL URI to connect to your database (if not using secret manager)
SEED_LOCATION Path where seeds will be created/read (default: database/seeds)
LOG_QUERIES Set to true to enable SQLAlchemy logging
FASTSEEDER_CONNECTOR Optional. One of: gcs, aws (GCS implemented, AWS in progress)
GCP_PROJECT_ID (Only for GCS connector) Your Google Cloud project ID
GCS_DB_URI_SECRET_NAME (Only for GCS connector) Name of the secret that stores your DB URI
GCS_DB_URI_SECRET_VERSION Optional. Defaults to "latest"

🔌 Connectors

FastSeeder supports pluggable secret managers to load the database URI.

Connector Install Command Status
GCS pip install fastseeder[gcs] ✅ Implemented
AWS pip install fastseeder[aws] 🚧 In progress

📦 Installation

Basic (with .env)

pip install fastseeder

With Google Cloud Secret Manager

pip install fastseeder[gcs]

Set in your .env:

FASTSEEDER_CONNECTOR=gcs
GCP_PROJECT_ID=your-project-id
GCS_DB_URI_SECRET_NAME=your-secret-name

🚀 Usage

Create a seed

run-seeds make "seed name"

This will create a timestamped seed file under database/seeds/.

Run all pending seeds

run-seeds seed 

All pending seeds will be displayed in a list for the user to confirm before execution.

Run all pending seeds without asking confirmation

run-seeds seed --yes

Seeds are only executed once and tracked using a seed_history table in your DB.


📌 Notes

  • Seeds must extend BaseSeed and define a unique seed_id.
  • You can define run() and optionally rollback() logic inside the class.
  • The CLI tool auto-detects pending seeds and runs them in chronological order.
  • Ideal for microservices and shared DB workflows.

📚 License

MIT — use it freely and contribute if you like!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastseeder-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastseeder-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file fastseeder-0.1.0.tar.gz.

File metadata

  • Download URL: fastseeder-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for fastseeder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b4968624adc526e2cadb335085a35520f250e7630f0aae2d65282624a653ba6
MD5 bab63c7f39a3d702f80d9b62a1b590dd
BLAKE2b-256 d40d1824b73ccaa3a3ae5afe11bd6c07b4815afa334d7067483b33e58fcf4093

See more details on using hashes here.

File details

Details for the file fastseeder-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fastseeder-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for fastseeder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 385d612fe535f6c69098df1b114c2e01aff51c2dc04ff3d571fd96a3953417e8
MD5 bf86cb023420ce52deb3914cfe072db9
BLAKE2b-256 b67853da4203c8cfcd4f73d29044346d5071ca6e62aee1eedfaf4485e5f1d049

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page