Generate and display a fake license

  Blog    |     January 30, 2026

To create a Fake Factory License generator, we'll design a Python program that generates realistic-looking fictional licenses with randomized details. The license will include key fields like license number, company name, address, product type, expiration date, and issuing authority.

Solution Code

import random
from datetime import datetime, timedelta
class FakeFactoryLicense:
    # Predefined lists for realistic data
    COMPANY_NAMES = [
        "Global Industries Inc.", "TechNova Solutions", "AeroMech Dynamics", 
        "EcoBuild Manufacturing", "Quantum Fabricators", "Nexus Systems Co."
    ]
    PRODUCT_TYPES = [
        "Automotive Parts", "Consumer Electronics", "Medical Devices", 
        "Aerospace Components", "Industrial Machinery", "Renewable Energy Systems"
    ]
    AUTHORITIES = [
        "Department of Manufacturing Standards", "Bureau of Industrial Compliance",
        "National Safety Administration", "Commerce Regulation Authority"
    ]
    STREETS = [
        "123 Industrial Park Blvd", "456 Tech Avenue", "789 Innovation Drive",
        "321 Factory Lane", "654 Supply Street", "987 Production Way"
    ]
    CITIES = [
        "Metropolis", "Riverside", "Springfield", "Westfield", "Northgate", "Southport"
    ]
    STATES = ["CA", "NY", "TX", "IL", "FL", "PA"]
    def __init__(self):
        # Generate random license details
        self.license_number = self._generate_license_number()
        self.company_name = random.choice(self.COMPANY_NAMES)
        self.address = self._generate_address()
        self.product_type = random.choice(self.PRODUCT_TYPES)
        self.expiration_date = self._generate_expiration_date()
        self.issuing_authority = random.choice(self.AUTHORITIES)
        self.issue_date = datetime.now().strftime("%Y-%m-%d")
    def _generate_license_number(self):
        """Generate a random alphanumeric license number (8 characters)."""
        chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
        return ''.join(random.choices(chars, k=8))
    def _generate_address(self):
        """Generate a random address."""
        street = random.choice(self.STREETS)
        city = random.choice(self.CITIES)
        state = random.choice(self.STATES)
        zip_code = f"{random.randint(10000, 99999)}"
        return f"{street}, {city}, {state} {zip_code}"
    def _generate_expiration_date(self):
        """Generate a random expiration date within 5 years."""
        days_ahead = random.randint(1, 5 * 365)
        expiration = datetime.now() + timedelta(days=days_ahead)
        return expiration.strftime("%Y-%m-%d")
    def display_license(self):
        """Print the formatted license."""
        print("=" * 60)
        print("FACTORY LICENSE".center(60))
        print("=" * 60)
        print(f"License Number: {self.license_number}")
        print(f"Company Name: {self.company_name}")
        print(f"Address: {self.address}")
        print(f"Product Type: {self.product_type}")
        print(f"Issuing Authority: {self.issuing_authority}")
        print(f"Issue Date: {self.issue_date}")
        print(f"Expiration Date: {self.expiration_date}")
        print("=" * 60)
        print("LICENSE IS VALID ONLY FOR FICTITIOUS PURPOSES".center(60))
        print("=" * 60)
if __name__ == "__main__":
    license = FakeFactoryLicense()
    license.display_license()

Key Features

  1. Realistic Data: Uses predefined lists for company names, product types, and authorities to ensure plausible details.
  2. Randomized Fields:
    • License Number: 8-character alphanumeric string.
    • Address: Combines random streets, cities, states, and ZIP codes.
    • Expiration Date: Falls within the next 5 years.
    • Issue Date: Set to the current date.
  3. Professional Formatting: The license is printed in a bordered, centered layout for authenticity.
  4. Disclaimer: Includes a clear warning that the license is fictitious.

Example Output

============================================================
                        FACTORY LICENSE                        
============================================================
License Number: K7X9P2R3
Company Name: TechNova Solutions
Address: 456 Tech Avenue, Northgate, TX 75023
Product Type: Medical Devices
Issuing Authority: Bureau of Industrial Compliance
Issue Date: 2023-10-05
Expiration Date: 2026-05-18
============================================================
       LICENSE IS VALID ONLY FOR FICTITIOUS PURPOSES       
============================================================

Usage

  • Run the script to generate a new fake license each time.
  • Customize the predefined lists (e.g., COMPANY_NAMES, PRODUCT_TYPES) to suit specific scenarios.
  • Integrate the FakeFactoryLicense class into larger applications for testing or demonstration purposes.

This solution provides a simple, reusable way to generate fake factory licenses with realistic yet clearly fictional details.


Request an On-site Audit / Inquiry

SSL Secured Inquiry