Skip to main content

pii-data-generator

A simple "Personally identifiable information" (PII) Data Generator for both programmers and non programmers...

Built with ❤︎ and ☕ in one night by Deepak Rajpurohit


GitHub PyPI - Python Version

Features

Generate Data of PII like :

  • Generate Cradit-Card (Visa/Master-card)
  • Generate email
  • Generate mobile numbers
  • Generate First Name
  • Generate Last Name
  • Generate Address
  • Generate Country
  • Generate Weight/Height
  • Generate CVV number
  • Generate Card - Expiry Date

Installation

  • You can install this package using
pip install pii-data-generator
  • after installing package

Usage

For Non-Programmers usage / CLI:

  • write pii command that will generate for 10 persons and store them in json file

  • for more data generation use pii --n 400 this will generate 400 PII person data with "visa" credit card

  • if you want to generate master cards pii --n 400 --c master card this will generate 400 PII data with master card

  • if you want both cards types than use pii --n 400 --a yes

  • if you want to insert this data in mongodb pii --n 400 --a yes --conn <mongo-db connection string>

# PII
pii --n 100 --a yes

# insert data in mongodb
pii --n 400  --a yes --conn <mongo-db connection string>

For Programmers usage:

AZURE

For the all the cosmos databases or in mongo database

from pii_generator.pii_data_generator import PIIGenerator
pii_gen = PIIGenerator(how_many=100, both_credit_type=True)

database_conn_string = ""
pii_gen.insert_data_in_mongo(database_conn_string)

For the config files example you can go here... Config Files Example

For insert data in azure mysql

from pii_generator.pii_data_generator import PIIGenerator
pii_gen = PIIGenerator(how_many=100, both_credit_type=True)

mysql_config_json_file_path = "/Users/deepak9636/Downloads/pii-data-generator-master/config_example/azure_mysql.json"
pii_gen.insert_pii_data_in_azure_mysql_db(mysql_config_json_file_path)

For insert data in azure postgres

from pii_generator.pii_data_generator import PIIGenerator
pii_gen = PIIGenerator(how_many=100, both_credit_type=True)

psql_config_json_file_path = "/Users/deepak9636/Downloads/pii-data-generator-master/config_example/azure_psql.json"
pii_gen.insert_pii_data_in_azure_mysql_db(psql_config_json_file_path)

For insert data in azure maria

from pii_generator.pii_data_generator import PIIGenerator
pii_gen = PIIGenerator(how_many=100, both_credit_type=True)

maria_config_json_file_path = "/Users/deepak9636/Downloads/pii-data-generator-master/config_example/maria.json"
pii_gen.insert_pii_data_in_azure_maria_db(maria_config_json_file_path)

for insert data in azure sql

from pii_generator.pii_data_generator import PIIGenerator
pii_gen = PIIGenerator(how_many=100, both_credit_type=True)

sql_config_json_file_path = "/Users/deepak9636/Downloads/pii-data-generator-master/config_example/azure_sql.json"
print(pii_gen.insert_pii_data_in_azure_sql(sql_config_json_file_path))

GCP

For the all the cosmos databases or in mysql database

from pii_generator.pii_data_generator import PIIGenerator
pii_gen = PIIGenerator(how_many=100, both_credit_type=True)

mysql_config_json_file_path = "/Users/deepak9636/Downloads/pii-data-generator-master/config_example/gcp_mysql.json"
pii_gen.insert_pii_data_in_gcp_mysql_db(mysql_config_json_file_path)

For the all the cosmos databases or in postgres database

from pii_generator.pii_data_generator import PIIGenerator
pii_gen = PIIGenerator(how_many=100, both_credit_type=True)

psql_config_json_file_path = "/Users/deepak9636/Downloads/pii-data-generator-master/config_example/gcp_psql.json"
pii_gen.insert_pii_data_in_gcp_psql_db(psql_config_json_file_path)

For the all the cosmos databases or in Sql database

from pii_generator.pii_data_generator import PIIGenerator
pii_gen = PIIGenerator(how_many=100, both_credit_type=True)

sql_config_json_file_path = "/Users/deepak9636/Downloads/pii-data-generator-master/config_example/gcp_psql.json"
pii_gen.insert_pii_data_in_gcp_sql_db(sql_config_json_file_path)
from pprint import pprint
from pii_generator.pii_data_generator import PIIGenerator

pii_gen = PIIGenerator(100, 'visa', True)

# this will give you data in dictionary format
pprint(pii_gen.get_data_in_dict())

# this will give you data in json format
pii_gen.get_data_in_json()

# this will give you data in json file on desktop
pii_gen.get_data_in_json_file()


# this will give you data in pandas data frame
pii_gen.get_data_in_df()


# this will Insert pii data in data in mongodb
pii_gen.insert_data_in_mongo(connection_string)

Thank you

Metadata

Release files for pii-data-generator 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pii-data-generator 1.1.2
File Size Uploaded Provenance Actions
pii-data-generator-1.1.2.tar.gz 14.9 kB Without provenance Details for pii-data-generator-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pii-data-generator 1.1.2
File Interpreter ABI Platform Actions
pii_data_generator-1.1.2-py3-none-any.whl Python 3 none any Details for pii_data_generator-1.1.2-py3-none-any.whl

Total release size: 38.5 kB

Release files / pii-data-generator-1.1.2.tar.gz

Download URL pii-data-generator-1.1.2.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
47507d2a20c55c2e0c281ea531a308ae818e22937e6b1fcafbc5e30f8e65cbe9
BLAKE2b-256 checksum
How to use checksums
1dc69b22b8dd3c1a79e4f22b0f453e37d1e8e1fc21c9b5ec7e985fe49ed32195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Release files / pii_data_generator-1.1.2-py3-none-any.whl

Download URL pii_data_generator-1.1.2-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
793171d35ceae571286783ee4dff444539339627866585024a64fea95e433907
BLAKE2b-256 checksum
How to use checksums
9d8ecdd642799104d93d7472fbf06eb637ebac6f8e6f15c545dd476f2a44bdd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Security for pii-data-generator 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page