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

Uploaded Source

Built Distribution

db_mockdata-0.1.4-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: db_mockdata-0.1.4.tar.gz
  • Upload date:
  • Size: 2.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.4.tar.gz
Algorithm Hash digest
SHA256 b09ab0110008fe4fe45ec3fc5e53af22b5717d41b9ed5a631b90c51fea126fa2
MD5 73b450c7bee3495e3b2636a4f60f4a85
BLAKE2b-256 2583bd2c553e9e80ebce11bd5ef3566aebf9928ef339d1023bb1a8712f9ba595

See more details on using hashes here.

File details

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

File metadata

  • Download URL: db_mockdata-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 2.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b86da33b1092c9ab75cd62174eca69fb99d42b3ac719cd2134d42f32b6bccf69
MD5 c9aaa752731b281ea91da65395af2673
BLAKE2b-256 25110655005e73bb180f73b0b75f7e2d0743fe23e62d8ffac4c14ad811f60c79

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