![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A comprehensive Python library for AI integration, web development with FastAPI/Flask, advanced encryption, secure database management, file operations, library development, text styling, system management, translation services, video creation, web automation, and cryptocurrency token analysis. Features include JWT handling, password management, rate limiting, input sanitization, and more.
A comprehensive Python library for AI integration, web development with FastAPI/Flask, advanced encryption, secure database management, file operations, library development, text styling, system management, translation services, video creation, web automation, and cryptocurrency token analysis. Features include JWT handling, password management, rate limiting, input sanitization, and more.
Create and run web servers with ease:
from INEX import Server
# Initialize server
server = Server()
# Add routes
server.route_flask("/", "Welcome to INEX!")
server.route_flask("/hello", "Hello, World!")
server.route_flask("/api/v1", "API Version 1.0")
# Run server
server.run(
debug=True,
host="0.0.0.0",
port="8000"
)
from INEX import Server
from flask import request, jsonify
server = Server()
# REST API Endpoints
def create_api():
# User endpoint
server.route_flask(
"/api/users",
lambda: jsonify({
"users": ["user1", "user2"]
})
)
# Data endpoint with parameters
server.route_flask(
"/api/data/<id>",
lambda id: jsonify({
"id": id,
"data": "Sample data"
})
)
# Protected endpoint
server.route_flask(
"/api/protected",
lambda: (
jsonify({"error": "Unauthorized"})
if not request.headers.get("X-API-Key")
else jsonify({"status": "success"})
)
)
# Static file serving
def setup_static():
server.route_flask(
"/static/<path:filename>",
lambda filename: send_from_directory("static", filename)
)
# Error handlers
def setup_errors():
@server.apps.errorhandler(404)
def not_found(e):
return jsonify({"error": "Not found"}), 404
@server.apps.errorhandler(500)
def server_error(e):
return jsonify({"error": "Server error"}), 500
# Initialize and run
create_api()
setup_static()
setup_errors()
server.run(
debug=False, # Production mode
host="0.0.0.0",
port="80"
)
# Using Gunicorn
gunicorn -w 4 -b 0.0.0.0:8000 app:server.apps
# Using Uvicorn
uvicorn app:server.apps --host 0.0.0.0 --port 8000 --workers 4
# Using Supervisor
[program:inex]
command=gunicorn -w 4 -b 0.0.0.0:8000 app:server.apps
directory=/path/to/app
user=www-data
autostart=true
autorestart=true
from INEX import EnDeCrypt
# Encrypt a file using AES
EnDeCrypt.aes.encrypt(
file_path="secret_document.pdf",
password="your-secure-password"
)
# Decrypt an AES-encrypted file
EnDeCrypt.aes.decrypt(
file_path="secret_document.pdf.ywpdne",
password="your-secure-password"
)
from INEX import EnDeCrypt
# Encrypt using Blowfish
EnDeCrypt.BlowFish.encrypt(
file_path="confidential.doc",
password="your-secure-password"
)
# Decrypt Blowfish-encrypted file
EnDeCrypt.BlowFish.decrypt(
file_path="confidential.doc.ywpdne",
password="your-secure-password"
)
from INEX import EnDeCrypt
# Base64 encoding
EnDeCrypt.Base64.encrypt("data.bin")
EnDeCrypt.Base64.decrypt("data.bin.ywpdne")
# Hexadecimal encoding
EnDeCrypt.Hex.encrypt("binary_file.dat")
EnDeCrypt.Hex.decrypt("binary_file.dat.ywpdne")
Implement robust security features with ease:
from INEX import Security
# Initialize security with optional secret key
security = Security(secret_key="your-secret-key")
# Password Management
hashed_password = security.hash_password("user_password")
is_valid = security.verify_password("user_password", hashed_password)
# JWT Token Handling
token = security.create_jwt_token(
data={"user_id": 123},
expires_delta=timedelta(hours=1)
)
payload = security.verify_jwt_token(token)
# Data Encryption
encrypted = security.encrypt_data("sensitive data")
decrypted = security.decrypt_data(encrypted)
# API Key Management
api_key, hashed_key = security.create_api_key(prefix="sk")
is_valid = security.verify_api_key(api_key, hashed_key)
# Input Sanitization
safe_input = security.sanitize_input(
input_str="<script>alert('xss')</script>",
allow_html=False
)
# Rate Limiting
is_allowed, remaining = security.rate_limit_check(
key="user_ip",
max_requests=100,
time_window=3600
)
from INEX import Security
from datetime import timedelta
security = Security()
# Comprehensive Password Management
def register_user(username: str, password: str):
# Validate password strength
is_valid, failures = security.validate_password_strength(password)
if not is_valid:
return {"error": failures}
# Hash password and create API key
hashed_pwd = security.hash_password(password)
api_key, hashed_key = security.create_api_key(prefix="user")
# Generate backup codes for 2FA
backup_codes = security.generate_backup_code(
length=8,
num_codes=10
)
return {
"hashed_password": hashed_pwd,
"api_key": api_key,
"backup_codes": backup_codes
}
# Secure File Operations
def process_secure_upload(file_path: str, data: str):
# Validate file type
if not security.validate_file_type(
file_path,
allowed_extensions=['.pdf', '.doc', '.txt']
):
return {"error": "Invalid file type"}
# Calculate file hash
file_hash = security.hash_file(file_path)
# Encrypt data
encrypted_data = security.encrypt_data(data)
return {
"file_hash": file_hash,
"encrypted_data": encrypted_data
}
# API Security
def secure_api_endpoint(api_key: str, data: str, client_ip: str):
# Verify API key
if not security.verify_api_key(api_key, stored_hash):
return {"error": "Invalid API key"}
# Check rate limit
is_allowed, remaining = security.rate_limit_check(
client_ip,
max_requests=100,
time_window=3600
)
if not is_allowed:
return {"error": f"Rate limit exceeded. Try again later."}
# Validate IP
if not security.validate_ip(
client_ip,
allowed_ranges=['192.168.1.0/24', '10.0.0.0/8']
):
return {"error": "IP not allowed"}
# Process request
sanitized_data = security.sanitize_input(data)
encrypted_response = security.encrypt_asymmetric(sanitized_data)
return {
"encrypted_response": encrypted_response,
"remaining_requests": remaining
}
Create engaging terminal output with custom text animations:
from INEX import PrintStyle
# Print text character by character
PrintStyle.print_one(
text="Welcome to INEX!",
second=0.05 # Delay between characters
)
# Print text with calculated timing
PrintStyle.print_all(
text="Loading your application...",
total_time=3.0 # Total duration for the text
)
from INEX import PrintStyle
# Create a loading animation
def show_loading():
PrintStyle.print_all(
text="Initializing system components...",
total_time=2.0
)
PrintStyle.print_one(
text="[====================]",
second=0.1
)
PrintStyle.print_all(
text="System ready!",
total_time=1.0
)
# Create a typewriter effect
def typewriter_effect(text):
PrintStyle.print_one(
text=text,
second=0.03 # Fast typing speed
)
# Create a dramatic reveal
def dramatic_reveal():
messages = [
"Connecting to server...",
"Authenticating...",
"Access granted!",
]
for msg in messages:
PrintStyle.print_all(text=msg, total_time=1.5)
Simple and secure file operations:
from INEX import Files
# Create a new file
Files.create_file("example.txt") # Will prompt for content
# Open a file
Files.open_file("example.txt")
# Delete a file
Files.delete_file("example.txt")
# Delete multiple files by type
Files.delete_all_files(
directory="./downloads",
type={
"1": ".txt",
"2": ".tmp"
}
)
from INEX import Files
# Delete all temporary files in a directory
Files.delete_all_files(
directory="./temp",
type={
"1": ".tmp",
"2": ".cache",
"3": ".log"
}
)
# Create a configuration file
Files.create_file("config.json")
# Enter JSON content when prompted
# Safely open a file
try:
status = Files.open_file("document.pdf")
if status == "Not Found Path":
print("File does not exist")
elif status == "open":
print("File opened successfully")
except Exception as e:
print(f"Error: {e}")
Create a modern, high-performance API server with minimal code:
from INEX import FastAPIServer
# Initialize server
server = FastAPIServer()
# Add an endpoint
def hello_world():
return {"message": "Hello, World!"}
server.add_endpoint("/", hello_world)
# Enable CORS
server.add_cors()
# Run the server
server.run(host="0.0.0.0", port=8000)
from INEX import FastAPIServer
from typing import Dict
# Initialize server
server = FastAPIServer()
# Add POST endpoint with query parameters
def create_item(name: str, price: float) -> Dict:
return {
"item": name,
"price": price,
"status": "created"
}
server.add_endpoint("/items", create_item, method="POST")
# Add GET endpoint
def get_items():
return {"items": ["item1", "item2"]}
server.add_endpoint("/items", get_items, method="GET")
# Run with custom configuration
server.add_cors()
server.run(host="localhost", port=3000)
from INEX import Database
# Initialize encrypted database
db = Database("app.db", password="your-secure-password")
# Create table with custom schema
columns = {
"id": "INTEGER PRIMARY KEY AUTOINCREMENT",
"username": "TEXT NOT NULL",
"email": "TEXT UNIQUE",
"created_at": "TIMESTAMP DEFAULT CURRENT_TIMESTAMP"
}
db.create_table("users", columns)
# Fetch all users
all_users = db.fetch(
table_name="users",
columns=["username", "email"],
type="all"
)
# Fetch single user with condition
user = db.fetch(
table_name="users",
columns=["*"],
where=["email = ?", "user@example.com"],
type="one"
)
Manage system operations with ease:
from INEX import System
# System operations
system = System()
# Shutdown system (Windows, Linux, macOS)
system.shutdown()
# Restart system (Windows)
system.restart()
# Hibernate system (Windows)
system.hibernate()
# Log off current user (Windows)
system.log_off()
from INEX import System
import psutil
import platform
import os
# System information
def get_system_info():
return {
"os": platform.system(),
"release": platform.release(),
"version": platform.version(),
"machine": platform.machine(),
"processor": platform.processor(),
"cpu_count": psutil.cpu_count(),
"memory": {
"total": psutil.virtual_memory().total,
"available": psutil.virtual_memory().available,
"percent": psutil.virtual_memory().percent
},
"disk": {
"total": psutil.disk_usage('/').total,
"used": psutil.disk_usage('/').used,
"free": psutil.disk_usage('/').free,
"percent": psutil.disk_usage('/').percent
}
}
# Process management
def monitor_processes():
processes = []
for proc in psutil.process_iter(['pid', 'name', 'cpu_percent', 'memory_percent']):
processes.append(proc.info)
return processes
# Network interfaces
def get_network_info():
interfaces = []
for iface, addrs in psutil.net_if_addrs().items():
for addr in addrs:
if addr.family == psutil.AF_INET:
interfaces.append({
"interface": iface,
"address": addr.address,
"netmask": addr.netmask
})
return interfaces
# Hardware monitoring
def monitor_hardware():
return {
"cpu_freq": psutil.cpu_freq(),
"cpu_percent": psutil.cpu_percent(interval=1, percpu=True),
"memory_usage": psutil.virtual_memory(),
"swap_usage": psutil.swap_memory(),
"disk_io": psutil.disk_io_counters(),
"network_io": psutil.net_io_counters()
}
from INEX.AI import AI
# Initialize Gemini
gemini = AI.Gemini(api_key="your-gemini-api-key")
# Send a message
response = gemini.send_message("Tell me about quantum computing")
# Create a conversation
conversation = gemini.create_conversation("Let's discuss AI")
conversation_id = conversation['id']
# Get messages from conversation
messages = gemini.get_messages(conversation_id)
from INEX import AI
# Initialize ChatGPT
chatgpt = AI.ChatGPT(api_key="your-openai-api-key", model="gpt-4")
# Send a message with system prompt
response = chatgpt.send_message(
"Explain quantum entanglement",
system_prompt="You are a quantum physics expert"
)
# Create a multi-message chat
messages = [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "What is machine learning?"}
]
chat_response = chatgpt.create_chat(messages)
from INEX import AI
# Initialize DeepSeek
deepseek = AI.DeepSeek(api_key="your-deepseek-api-key")
# Generate code
code_response = deepseek.generate_code(
prompt="Create a FastAPI hello world app",
language="python"
)
# Analyze code
analysis = deepseek.analyze_code(code="def hello(): return 'world'")
from INEX import Crypto
# Get Binance Smart Chain token information
Crypto.token_information("0x123...", type="binance")
# Get Ethereum token information
Crypto.token_information("0xabc...", type="ethereum")
# Get GeckoTerminal pool information
Crypto.token_information("pool_id", type="geckoterminal")
Create and distribute Python packages with ease:
from INEX import Libraries
# Create a new library setup
Libraries.Basic.basic_setup_file_creator(
library_name="my-library",
library_version="1.0.0",
description="A powerful Python library",
creator_name="Your Name",
creator_email="your.email@example.com",
libraries_required=["requests", "pandas"]
)
# Initialize with imports
Libraries.Basic.init_creator(
filesave="__init__.py",
filename="my_module",
function_class="MyClass"
)
# Create upload script
Libraries.Basic.upload_file_creator(
pypi_api="your-pypi-token",
platform="linux" # or "windows"
)
from INEX import Libraries
# Create a comprehensive setup
Libraries.Basic.basic_setup_file_creator(
library_name="advanced-lib",
library_version="2.1.0",
description="Advanced Python utilities",
creator_name="Team Lead",
creator_email="team@company.com",
libraries_required=[
"numpy>=1.20.0",
"scipy>=1.7.0",
"pandas>=1.3.0"
],
readme_name="README.md",
License="MIT"
)
# Initialize multiple modules
for module in ["core", "utils", "helpers"]:
Libraries.Basic.init_creator(
filesave="__init__.py",
filename=module,
function_class=f"{module.capitalize()}Class"
)
# Create platform-specific upload scripts
for platform in ["windows", "linux"]:
Libraries.Basic.upload_file_creator(
filename=f"upload_{platform}",
pypi_api="your-pypi-token",
platform=platform
)
Translate text between languages with ease:
from INEX import Translate
# Simple translation (auto-detect to English)
text = "Bonjour le monde"
translated = Translate.translate_text(text) # "Hello world"
# Specify source and target languages
text = "Hello, World!"
french = Translate.translate_text(text, to_lan="fr", from_lan="en") # "Bonjour le monde"
spanish = Translate.translate_text(text, to_lan="es", from_lan="en") # "¡Hola Mundo!"
chinese = Translate.translate_text(text, to_lan="zh-cn", from_lan="en") # "你好,世界!"
from INEX import Translate
from langdetect import detect
from deep_translator import GoogleTranslator
from textblob import TextBlob
# Language detection
def detect_language(text):
return detect(text)
# Multiple translation services
def translate_with_fallback(text, target_lang="en"):
try:
# Try Google Translate first
return Translate.translate_text(text, to_lan=target_lang)
except:
# Fallback to alternative service
return GoogleTranslator(source='auto', target=target_lang).translate(text)
# Batch translation
def batch_translate(texts, target_lang="en"):
return [Translate.translate_text(text, to_lan=target_lang) for text in texts]
# Language analysis
def analyze_text(text):
blob = TextBlob(text)
return {
"language": detect(text),
"sentiment": blob.sentiment,
"translated": str(blob.translate(to='en')),
"words": len(blob.words),
"sentences": len(blob.sentences)
}
# Example usage
text = "Je suis heureux de vous rencontrer!"
analysis = analyze_text(text)
print(f"Language: {analysis['language']}") # fr
print(f"English: {analysis['translated']}") # "I am happy to meet you!"
print(f"Sentiment: {analysis['sentiment']}") # Sentiment(polarity=0.8, subjectivity=1.0)
Common language codes:
Create videos from images with ease:
from INEX import VideosCreator
# Initialize video creator
creator = VideosCreator.Basic()
# Create a basic video from images
creator.basic_video_creator(
image_folder="images/",
animation_choice="FadeIn",
frame_rate=25,
video_name="my_video",
video_type="mp4",
video_platform="Youtube",
image_time=5
)
from INEX import VideosCreator
import os
def create_platform_videos(image_folder, animations=None):
"""Create videos optimized for different platforms"""
if animations is None:
animations = ['FadeIn', 'FadeOut', 'Rotate', 'FlipHorizontal', 'FlipVertical']
creator = VideosCreator.Basic()
platforms = {
'Youtube': 60,
'Facebook': 20,
'Instagram': 15,
'Tiktok': 60
}
results = {}
for platform, max_duration in platforms.items():
for animation in animations:
video_name = f"{platform.lower()}_{animation.lower()}"
try:
creator.basic_video_creator(
image_folder=image_folder,
animation_choice=animation,
frame_rate=30,
video_name=video_name,
video_type="mp4",
video_platform=platform,
image_time=min(5, max_duration/3) # Adjust time based on platform
)
results[video_name] = "Success"
except Exception as e:
results[video_name] = f"Failed: {str(e)}"
return results
def batch_process_folders(base_folder):
"""Process multiple image folders in batch"""
results = {}
for folder in os.listdir(base_folder):
folder_path = os.path.join(base_folder, folder)
if os.path.isdir(folder_path):
results[folder] = create_platform_videos(folder_path)
return results
# Example usage
results = batch_process_folders("image_collections/")
for folder, folder_results in results.items():
print(f"\nResults for {folder}:")
for video, status in folder_results.items():
print(f" {video}: {status}")
YouTube:
Facebook:
Instagram:
TikTok:
Open websites programmatically:
from INEX import Websites
# Open a website in the default browser
Websites.open_website("https://example.com")
from INEX import Websites
import validators
import asyncio
from typing import List, Dict
class WebsiteManager:
def __init__(self):
self.history: List[str] = []
self.status: Dict[str, str] = {}
def validate_url(self, url: str) -> bool:
"""Validate URL format"""
return bool(validators.url(url))
def open_with_validation(self, url: str) -> str:
"""Open URL with validation"""
if not self.validate_url(url):
return f"Invalid URL format: {url}"
try:
result = Websites.open_website(url)
if result == "opened":
self.history.append(url)
self.status[url] = "success"
return f"Successfully opened {url}"
return f"Failed to open {url}"
except Exception as e:
self.status[url] = "failed"
return f"Error opening {url}: {str(e)}"
async def open_multiple(self, urls: List[str]) -> Dict[str, str]:
"""Open multiple URLs asynchronously"""
results = {}
for url in urls:
results[url] = self.open_with_validation(url)
await asyncio.sleep(1) # Prevent browser overload
return results
def get_history(self) -> List[str]:
"""Get browsing history"""
return self.history
def get_status(self) -> Dict[str, str]:
"""Get status of opened URLs"""
return self.status
# Example usage
async def main():
manager = WebsiteManager()
# Open single website
print(manager.open_with_validation("https://example.com"))
# Open multiple websites
urls = [
"https://example.com",
"https://example.org",
"https://example.net"
]
results = await manager.open_multiple(urls)
# Print results
for url, status in results.items():
print(f"{url}: {status}")
# Print history
print("\nBrowsing History:")
for url in manager.get_history():
print(f"- {url}")
# Run the example
if __name__ == "__main__":
asyncio.run(main())
URL Handling:
Browser Management:
Security:
Performance:
Error Handling:
pip install INEX
Install INEX with specific feature sets:
# Web automation features
pip install INEX[web]
# Video creation features
pip install INEX[video]
# Translation features
pip install INEX[translation]
# Development tools
pip install INEX[dev]
# Security features
pip install INEX[security]
# Database features
pip install INEX[database]
# AI features
pip install INEX[ai]
# All features
pip install INEX[all]
# Clone the repository
git clone https://github.com/AmmarBasha2011/inex_library.git
# Navigate to the directory
cd inex_library
# Install in development mode
pip install -e .
We welcome contributions! Please see our contributing guidelines in the GitHub repository.
MIT License - see LICENSE file for details
FAQs
A comprehensive Python library for AI integration, web development with FastAPI/Flask, advanced encryption, secure database management, file operations, library development, text styling, system management, translation services, video creation, web automation, and cryptocurrency token analysis. Features include JWT handling, password management, rate limiting, input sanitization, and more.
We found that inex-library demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.