Skip to main content

It generats the dummy 'Personally identifiable information' data

Project description

pii-data-generator

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

Built with ❤︎ and :coffee: in one night by Deepak Rajpurohit


GitHub PyPI - Python Version Build Status

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:

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 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)

psql_config_json_file_path = "/Users/deepak9636/Downloads/pii-data-generator-master/config_example/maria.json"
pii_gen.insert_pii_data_in_azure_maria_db(psql_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

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

pii-data-generator-1.0.6.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pii_data_generator-1.0.6-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file pii-data-generator-1.0.6.tar.gz.

File metadata

  • Download URL: pii-data-generator-1.0.6.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pii-data-generator-1.0.6.tar.gz
Algorithm Hash digest
SHA256 e97f94d63a13d92bba0aab9b394ad90db52e0005fca488074a6c77c8ae5cc29b
MD5 59d08a6c8b33508c9969c681615df4fa
BLAKE2b-256 81d6e36580026bdf9e134b1910c2366cc77c256c3f6dd05ed670c76cbcf0a4cc

See more details on using hashes here.

File details

Details for the file pii_data_generator-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: pii_data_generator-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pii_data_generator-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 daa53e68ad94ea2227844aaa3fe231c64b814eae5faeb8630e51ece1a55ba44c
MD5 5660b17fef1f5e33a39bcb06ddf43988
BLAKE2b-256 3cb0a05d4b34f55274551b1bd19483435f12d8e248d685e9d9bdb7d3b099b153

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page