Skip to main content

A package to make seeds for some relational databases

Project description

Seeder for Mysql

gh-action-pip-audit

Load database then make seeds for it

Install

$ pip install dbseeder

Usage

from dbseeder import Database
db = Database(host="localhost", user="root", password="", database="seed")
# Make seed without deleting the existence data
db.makeSeed(rows_num=100000)
# Delete data, then make seeds
db.clearAndMakeSeed(rows_num=100000)

OR

$ python -m dbseeder --host localhost --user root --password= --database seed --rows_num 100 --drop

TODO

  • Load relationship
  • Add test
  • Add argparser

Test

python -m pytest

Packing

My note

To publish new version:

  • Change version in pyproject.toml
  • Build: python -m build
  • Upload to testpypi: py -m twine upload --repository testpypi dist/*
  • Upload to pypi: py -m twine upload --repository pypi dist/

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

dbseeder-0.0.4.3.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

dbseeder-0.0.4.3-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

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