Skip to main content

A Python library for generating realistic fake identities

Project description

Indentytool 🧠

Indentytool is a lightweight and versatile Python library for generating realistic fake identities, perfect for testing, social bots, behavioral analysis, or populating datasets.
It supports generating names, surnames, emails, passwords, phone numbers, postal codes (CAP), provinces, cities, dates of birth, and much more for multiple countries including Italy, Europe, and worldwide.


Key Features

  • Generate realistic male, female, and neutral gender first and last names
  • Create emails consistent with the generated name and surname
  • Generate passwords in three modes: random, based on name+birthdate, or from a list of common passwords
  • Produce phone numbers with realistic formats for different countries
  • Generate random birth dates within configurable ranges
  • Provide realistic cities, provinces, and postal codes based on an integrated database (Italy and other countries)
  • Multi-country support (e.g., 'it' for Italy, 'fr' for France, 'uk' for United Kingdom)
  • Easy to use and integrate into testing or simulation projects

Installation

Currently, the library is not published on PyPI, so you can install it by cloning the repository or downloading the indentytool.py file:

git clone https://github.com/yourusername/indentytool.git
cd indentytool
pip install -r requirements.txt  # If there are dependencies (currently none)

Alternatively, just copy the indentytool.py file into your project folder.


Usage

Import and create an instance

from indentytool import Indentytool

# Select country code (e.g., 'it' for Italy, 'fr' for France, 'uk' for United Kingdom)
tool = Indentytool('it')

Generate a full identity

identity = tool.generate_identity()
print(identity)

Example output:

{
  "nome": "Marco",
  "cognome": "Rossi",
  "sesso": "M",
  "data_nascita": "1985-07-23",
  "email": "marco.rossi@example.com",
  "telefono": "+39 345 123 4567",
  "città": "Milano",
  "provincia": "MI",
  "cap": "20100",
  "password": "Marco1985!"
}

Generate individual elements

# Random city
city, province, cap = tool.random_city()
print(city, province, cap)

# Random name and surname
nome, cognome = tool.random_name('F')
print(nome, cognome)

# Random email based on name and surname
email = tool.random_email(nome, cognome)
print(email)

# Random password
password = tool.random_password()
print(password)

# Password based on name and date of birth
password2 = tool.password_with_name_dob(nome, "1990-05-15")
print(password2)

# Common password from list
common_pw = tool.common_password()
print(common_pw)

# Random phone number
phone = tool.random_phone()
print(phone)

# Random date of birth
dob = tool.random_date_of_birth()
print(dob)

Example CLI script (app.py)

You can use this script to quickly test the library:

from indentytool import Indentytool
import json

def main():
    tool = Indentytool('it')
    for i in range(5):
        identity = tool.generate_identity()
        print(f"Identity #{i+1}:")
        for k, v in identity.items():
            print(f"  {k}: {v}")
        # Save to JSON file
        with open(f"identity_{i+1}.json", "w", encoding="utf-8") as f:
            json.dump(identity, f, ensure_ascii=False, indent=4)
        print(f"Saved to identity_{i+1}.json\n")

if __name__ == "__main__":
    main()

Customization

  • Change country by passing the appropriate code in the class constructor, e.g., tool = Indentytool('fr') for France
  • Modify date ranges or phone formats by editing constants in the code
  • Extend the databases (names, cities) by adding more data to the dictionaries in the source code

Internal workings and file size considerations

  • The library is a pure Python file containing large internal datasets for names, cities, provinces, postal codes, etc.
  • Typical .py file size ranges from about 100 KB up to a few hundred KB depending on dataset size
  • When Python runs or imports the library, it compiles the .py into .pyc bytecode files stored in __pycache__. These .pyc files are binary optimized versions usually similar in size to the .py
  • No external dependencies or compiled modules means lightweight footprint
  • If you integrate heavy dependencies like cryptography libraries, the size can increase by several MB due to native compiled code

Planned future features

  • Wider country support with larger and more accurate datasets worldwide
  • Export methods for datasets in CSV, JSON, or database formats
  • Optional integration with lightweight encryption libraries for data protection
  • More advanced customization and user-defined templates

License

MIT License © 2025 — Created by [Your Name]


Contributing

Feel free to open issues or submit pull requests on GitHub to improve the library or add features.


Thank you for choosing Indentytool! 🧠

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

indentytool-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

indentytool-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file indentytool-0.1.0.tar.gz.

File metadata

  • Download URL: indentytool-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for indentytool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 709f3d6ad4e3903927d6fe33f10f288756f5b4693e573f6e579fb4dded6d4c53
MD5 ff955f4eeafb984ac70b7a6c429527a0
BLAKE2b-256 d5761210374f67170679a55ee73a0cc8711d3dc4ebc53ab415e322b2f8e5d6c7

See more details on using hashes here.

File details

Details for the file indentytool-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: indentytool-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for indentytool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7df837a9be683fc380393d7692912271698de56cc726b3a81435664c6637a272
MD5 66e296dbc5d8f52c723452cb5c5eb984
BLAKE2b-256 105b241ef4e24a71d3a5572f2ce1c557bb157dc74265d813aec2d7bfdd8cbd3a

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