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.5.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

db_mockdata-0.1.5-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: db_mockdata-0.1.5.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for db_mockdata-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f418b82b3225b4d404e083dee480663329afcb0764bcdc5597132fffe9ed08bf
MD5 beb6d6ee907b7975f0cd606e80c5b1ea
BLAKE2b-256 2f2a5e5fea7a2728365915d208fb7371387ac5a9efc6c2c80bc79be9c8bd5d6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: db_mockdata-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for db_mockdata-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3bf8f34c470f79e4140b2484bf73059cb224f7faf9865cf63e44192f11494276
MD5 689b6bd946a063a4951bd8d93e8f2ef6
BLAKE2b-256 a46d9152a30f76959a7663c05e5874268e489ea61dfa1060ac5ad6b65fb73835

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