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

Uploaded Source

Built Distribution

db_mockdata-0.1.8-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: db_mockdata-0.1.8.tar.gz
  • Upload date:
  • Size: 5.9 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.8.tar.gz
Algorithm Hash digest
SHA256 ae8bb105b4a3bd95862903849a7f4999243624cb32d9f80a93691b196834561e
MD5 d50a5f9e4491d1e639824d2fa060d93c
BLAKE2b-256 af61ef033543f66cf4583aa10b5fc197dd6d6c6e606471c8ae45b9adff51a670

See more details on using hashes here.

File details

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

File metadata

  • Download URL: db_mockdata-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fa1c3675317d2ca1b95dd19b0a2aec30a6d9268fe6da58d137bc6a0ff51faabd
MD5 219362be4dddae454aff4e074424f7ab
BLAKE2b-256 9fd4ad19303313ada8bc81324fe0b72e50c4081c193cf642781268e95a6b85be

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