Trump Administration Export License System for AI Packages
Project description
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:
tpipchecks if the system is in a restricted country- If yes, it checks for a valid export license
- If a valid license exists, installation proceeds
- 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 licenselist: List all available licensesvalidate: Validate license for package installationcompliance: Check system compliancerevoke: Revoke a license
Shortcuts
- Use
telas a shortcut fortrump-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 expiredInvalidSignatureError: License signature is invalidHardwareMismatchError: Hardware not authorizedPackageNotAllowedError: Package not in allowed listCountryRestrictionError: Country is restrictedQuotaExceededError: Installation quota exceeded
Compliance Requirements
To be compliant with Trump administration export controls:
- System must not be in a restricted country
- Must have a valid export license for AI packages
- License must be valid (not expired)
- Hardware must match authorized hardware IDs
- 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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trump_export_license-1.0.0.tar.gz.
File metadata
- Download URL: trump_export_license-1.0.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02040bf6fd6f67bf9c53ea83f34fa9a67c6c5f0531246204ad9ec001ec308c61
|
|
| MD5 |
fccbd8bf74d5b61aeb6d4009231de473
|
|
| BLAKE2b-256 |
fa38542f78685fc6a20596e0d8756043e0729e9d474f4d02a51bcc3d5b8fea3f
|
File details
Details for the file trump_export_license-1.0.0-py3-none-any.whl.
File metadata
- Download URL: trump_export_license-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3cb085510fd5157ad166510c9bc27ff8cb642de10b2790daee8344b93c595ab
|
|
| MD5 |
cd9348fadc920cc40c739323bec6cf0f
|
|
| BLAKE2b-256 |
8b19db6587a6d50df618d0988ccb8b8e85c32a88a604e70678bebd71efc7b3d2
|