Skip to main content

Dashboard de análisis de rendimiento con decoradores inteligentes

Project description

🎩 Smooth Criminal

A Python performance acceleration toolkit with the soul of Michael Jackson.

Python License


🚀 ¿Qué es esto?

Smooth Criminal es una librería de Python para acelerar funciones y scripts automáticamente usando:

  • 🧠 Numba
  • ⚡ Asyncio y threading
  • 📊 Dashboard visual con Flet
  • 🧪 Benchmarks y profiling
  • 🎶 Estilo, carisma y mensajes inspirados en MJ

💡 Características principales

Decorador / Función Descripción
@smooth Aceleración con Numba (modo sigiloso y rápido)
@moonwalk Convierte funciones en corutinas async sin esfuerzo
@thriller Benchmark antes y después (con ritmo)
@jam(workers=n) Paralelismo automático con ThreadPoolExecutor
@black_or_white(mode) Optimiza tipos numéricos (float32 vs float64)
@bad Modo de optimización agresiva (fastmath)
@beat_it Fallback automático si algo falla
dangerous(func) Mezcla poderosa de decoradores (@bad + @thriller)
profile_it(func) Estadísticas detalladas de rendimiento
analyze_ast(func) Análisis estático para detectar código optimizable

🧠 Dashboard visual

Ejecuta el panel interactivo para ver métricas de tus funciones decoradas:

python -m smooth_criminal.dashboard

O bien:

python scripts/example_flet_dashboard.py
  • Tabla con tiempos, decoradores y puntuaciones

  • Botones para exportar CSV, limpiar historial o ver gráfico

  • Interfaz elegante con Flet (modo oscuro)

⚙️ Instalación

pip install smooth-criminal

O para desarrollo local:

git clone https://github.com/Alphonsus411/smooth_criminal.git
cd smooth_criminal
pip install -e .

💃 Ejemplo rápido

from smooth_criminal import smooth, thriller

@thriller
@smooth
def square(n):
    return [i * i for i in range(n)]

print(square(10))

🧪 CLI interactiva

smooth-criminal analyze my_script.py

Esto analizará tu código buscando funciones lentas, bucles, range(), etc.

📚 Documentación

Próximamente en ReadTheDocs…

📝 Licencia

MIT © Adolfo González

🎤 Créditos

  • Michael Jackson por la inspiración musical 🕺

  • Numba, NumPy, asyncio por la base técnica

  • Flet por el dashboard elegante

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

smooth_criminal-0.2.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

smooth_criminal-0.2.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file smooth_criminal-0.2.1.tar.gz.

File metadata

  • Download URL: smooth_criminal-0.2.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for smooth_criminal-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ee486e477c7e87463e6783765bdec42ae1103c2e754519a536c81f0dc55b2786
MD5 0643bfbe4c9f6f44163f2f19fe36ec7c
BLAKE2b-256 9fb0a53a59d51f9e7500df66d6d4912acd732621a2d69fc3052a6af7f0da845b

See more details on using hashes here.

File details

Details for the file smooth_criminal-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for smooth_criminal-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f145363ef8b21257c2445ac68647aff49c22f6bb6b49134954d7fce884beded
MD5 074778590c83edeb723b2867eb4430e0
BLAKE2b-256 3aa4a79127d2d87dbe50b892b2239f916e653aa9f4a7114282f4b0dcb1751060

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