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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: db_mockdata-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 d91518db45ea73ef4336a53d645c0e97356c0ff58f4c0b38d2bc184350221e69
MD5 1f526d73f4d12ee3afa4bc1487015ed5
BLAKE2b-256 c8f62070a59afd6c7d852af403ee47f7e4cbb0ce09b4ed80d5da1402cf4171d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: db_mockdata-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 be76ab022ffce0af4e686bb9dde3fac6d1ac42c11b8ac21750ddbd5aa4178294
MD5 13ad2335d929234bc5be6b18f5445f05
BLAKE2b-256 67856db4d8f52397a6cfaa2952f985267737f210152960ef7d1aa2f7b211e086

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