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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file db_mockdata-0.2.1.tar.gz
.
File metadata
- Download URL: db_mockdata-0.2.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d739c4239a1866985cda80c1cc85401103b4e4572d329767330e85ab2f97b3c4 |
|
MD5 | a9c7bd6fb1490c4df2719600e38833d6 |
|
BLAKE2b-256 | 4f5243f2b65424679819d755d188f82615b1063d5760c0f14e9de2c6fb117d0f |
File details
Details for the file db_mockdata-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: db_mockdata-0.2.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 313c377d329d052bbb6e9d906fcc7265974004c9eb690afcf23f0aa4a8823a0d |
|
MD5 | 3cabf0f781d5c0b1d29e99f465566adc |
|
BLAKE2b-256 | c562861315a3ed80f7bc9e31322b28f4c4d51d1d32722775b0c6f8c98afa85c1 |