Skip to main content

Simple package for creating mockdata for a live database, according to specified relational schema.

Project description

Mock data generation

This is small project for generating artificial / mock data, conforming to the specified DB schema. It can be useful to either generate pseudo-realistic data in the database, or prepare large amounts of mock data for stress testing.

The package allows for generating mock data for specified database schema.

Configuration file schema:

{
  "connection": "postgresql+psycopg2://admin:test@172.17.0.1:5432/ChmielDB",
  "tables": {
        "Projects":{
        "id": "PK serial",
        "project_name": "first_name",
        "project_owner": "FK Users.id"
      },
      "Users": {
        "id": "PK serial",
        "first_name": "first_name",
        "last_name": "last_name",
        "email": "email UNIQUE",
        "password": "password",
        "role": "OPTION IN (USER, ADMIN)",
        "address": "address",
        "birth_date": "timestamp",
        "phone_number": "phone"
      },
      "IntermediaryTable: Projects_Users": {
        "project_id": "FK Projects.id",
        "user_id": "FK Users.id"
      },
  },
  "objects_count": {
    "Users": 25,
    "Projects": 10,
    "Projects_Users": 250,
  }

Allowed column keywords:

Disclaimer:

The program only checks for uniqueness and integrity withing itself, there can still be error if there's already existing data in the database.

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

db_mockdata-0.1.9.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

db_mockdata-0.1.9-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file db_mockdata-0.1.9.tar.gz.

File metadata

  • Download URL: db_mockdata-0.1.9.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for db_mockdata-0.1.9.tar.gz
Algorithm Hash digest
SHA256 e7ee075ab1145da13ba85528f77334c12d655668ea4d4b2b88f27e9bc291805c
MD5 5ca7289860caedf766b4de01fe12490c
BLAKE2b-256 cc8f0c721f5bd55e48c574b15ec58229c230740b1271eb8d4f3867ef93223bc0

See more details on using hashes here.

File details

Details for the file db_mockdata-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: db_mockdata-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for db_mockdata-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 6d52410e1165d32119b61fa91cc35a0d4828a7f2613ce0e89606710670687a6b
MD5 aa624b1dafb204d77b95fdcc18936692
BLAKE2b-256 fbd4ce9f030c63bfbc17d97dc8d05b3de7b9de2eeaeabaa0af779ef709d5c250

See more details on using hashes here.

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