Skip to main content

Trump Administration Export License System

A comprehensive export license system for AI packages under Trump administration policies.

Overview

This system provides export license management for AI packages that are subject to Trump administration export controls. It allows authorized users to generate, validate, and manage licenses for installing AI packages in compliant systems.

Features

  • License Generation: Create export licenses for AI packages
  • License Validation: Validate licenses before package installation
  • Hardware Binding: Bind licenses to specific hardware
  • Country Restrictions: Enforce country-based restrictions
  • Installation Quotas: Limit number of installations per license
  • Compliance Checking: Check system compliance with export controls
  • License Revocation: Revoke licenses when needed

Installation

pip install trump-export-license

Or install from source:

cd export_license
pip install .

Quick Start

1. Generate a License

# Interactive mode
trump-export-license generate

# Or with arguments
trump-export-license generate \
  --applicant "John Doe" \
  --company "AI Corp" \
  --country US \
  --packages tensorflow pytorch transformers \
  --validity 365 \
  --max-installations 100 \
  --type STANDARD

2. Check System Compliance

trump-export-license compliance

3. Validate License for Package

trump-export-license validate --package tensorflow

4. List All Licenses

trump-export-license list

5. Revoke a License

trump-export-license revoke --license-id YOUR_LICENSE_ID

License Types

  • STANDARD: Basic license for individual developers
  • ENTERPRISE: License for corporate use with multiple hardware IDs
  • GOVERNMENT: License for government agencies with additional restrictions

Restricted Countries

The following countries are automatically restricted:

  • China (CN)
  • Russia (RU)
  • Iran (IR)
  • North Korea (KP)
  • Syria (SY)
  • Cuba (CU)
  • Venezuela (VE)

Integration with Trump-Powered Pip

This system integrates seamlessly with trump-pip (tpip). When you try to install an AI package:

  1. tpip checks if the system is in a restricted country
  2. If yes, it checks for a valid export license
  3. If a valid license exists, installation proceeds
  4. If no valid license exists, installation is blocked

API Usage

Basic Usage

from export_license import LicenseManager

# Create license manager
manager = LicenseManager()

# Generate a new license
license_data = manager.generate_new_license(
    applicant_name="John Doe",
    company="AI Corp",
    country="US",
    allowed_packages=["tensorflow", "pytorch", "transformers"],
    validity_days=365,
    max_installations=100
)

# Validate license for installation
try:
    is_valid = manager.validate_installation(
        package_name="tensorflow",
        license_data=license_data
    )
    if is_valid:
        print("Installation allowed")
except ValidationError as e:
    print(f"Installation blocked: {e}")

# Check system compliance
report = manager.check_system_compliance()
print(f"Compliance status: {report['compliance_status']}")

Advanced Usage

from export_license import LicenseGenerator, LicenseValidator

# Generate hardware ID
generator = LicenseGenerator()
hardware_id = generator.generate_hardware_id()
print(f"Hardware ID: {hardware_id}")

# Validate license with custom parameters
validator = LicenseValidator()
is_valid = validator.validate_license(
    license_data=license_data,
    package_name="tensorflow",
    hardware_id=hardware_id,
    country="US"
)

Command Line Interface

Available Commands

  • generate: Generate a new export license
  • list: List all available licenses
  • validate: Validate license for package installation
  • compliance: Check system compliance
  • revoke: Revoke a license

Shortcuts

  • Use tel as a shortcut for trump-export-license
  • Example: tel compliance

License File Structure

License files are stored in ~/.trump_export_licenses/ as JSON files. Each license contains:

{
  "license_id": "uuid",
  "license_type": "STANDARD|ENTERPRISE|GOVERNMENT",
  "applicant": {
    "name": "Applicant Name",
    "company": "Company Name",
    "country": "Country Code"
  },
  "permissions": {
    "allowed_packages": ["tensorflow", "pytorch"],
    "hardware_ids": ["HW-abc123"],
    "max_installations": 100,
    "installations_used": 0
  },
  "validity": {
    "issue_date": "2025-01-01T00:00:00",
    "expiry_date": "2026-01-01T00:00:00",
    "validity_days": 365
  },
  "restrictions": {
    "countries_blacklist": ["CN", "RU", "IR", "KP", "SY", "CU", "VE"],
    "requires_internet": true,
    "requires_government_approval": false
  },
  "signature": "sha256_signature"
}

Security Features

  • Digital Signatures: All licenses are digitally signed
  • Hardware Binding: Licenses can be bound to specific hardware
  • Country Detection: Automatic country detection and restriction
  • Quota Enforcement: Strict installation quota enforcement
  • Revocation Support: Ability to revoke compromised licenses

Error Handling

The system provides detailed error messages for various scenarios:

  • ExpiredLicenseError: License has expired
  • InvalidSignatureError: License signature is invalid
  • HardwareMismatchError: Hardware not authorized
  • PackageNotAllowedError: Package not in allowed list
  • CountryRestrictionError: Country is restricted
  • QuotaExceededError: Installation quota exceeded

Compliance Requirements

To be compliant with Trump administration export controls:

  1. System must not be in a restricted country
  2. Must have a valid export license for AI packages
  3. License must be valid (not expired)
  4. Hardware must match authorized hardware IDs
  5. Installation quota must not be exceeded

Disclaimer

This is a demonstration tool for educational purposes. It simulates export control policies but does not implement actual government regulations. Do not use in production environments.

License

This software is proprietary and subject to Trump administration export controls. Unauthorized distribution or use is prohibited.

Support

For support and compliance questions, contact:

Metadata

Release files for trump-export-license 1.0.0

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

Source distribution (sdist)

Source distribution for trump-export-license 1.0.0
File Size Uploaded
trump_export_license-1.0.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trump-export-license 1.0.0
File Interpreter ABI Platform
trump_export_license-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / trump_export_license-1.0.0.tar.gz

Download URL trump_export_license-1.0.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
02040bf6fd6f67bf9c53ea83f34fa9a67c6c5f0531246204ad9ec001ec308c61
BLAKE2b-256 checksum
How to use checksums
fa38542f78685fc6a20596e0d8756043e0729e9d474f4d02a51bcc3d5b8fea3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / trump_export_license-1.0.0-py3-none-any.whl

Download URL trump_export_license-1.0.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3cb085510fd5157ad166510c9bc27ff8cb642de10b2790daee8344b93c595ab
BLAKE2b-256 checksum
How to use checksums
8b19db6587a6d50df618d0988ccb8b8e85c32a88a604e70678bebd71efc7b3d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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