Aplicación de escritorio desarrollada con Flet en Python, diseñada para automatizar tareas de mantenimiento y configuración de red en Windows. Provee una interfaz gráfica sencilla para:
- Eliminar archivos temporales
- Configurar IP dinámica por DHCP
- Asignar IP estática (hogar u oficina)
- Vaciar la papelera de reciclaje
Todo ello usando comandos nativos de Windows (netsh, ipconfig, PowerShell, etc.).
- Requisitos y dependencias
- Estructura de archivos
- Cómo clonar y ejecutar el proyecto
- Uso de la aplicación
- Empaquetar la app (opcional)
- Run the app
- Referencias técnicas
- Consideraciones finales
- Licencia
- Python 3.9+ (recomendado) instalado en el sistema.
- Biblioteca Flet: Para la interfaz gráfica.
- Sistema operativo Windows con acceso a:
netsh(para configurar la red)ipconfig(para liberar y renovar IP)powershell(para vaciar la papelera)
FletMantenimientoYRedes/
│
├─ src/
│ ├─ mantenimiento.py # Lógica de mantenimiento (elimina temp, asigna IP, etc.)
│ ├─ interfaz.py # Interfaz Flet (UI)
│ ├─ main.py # Punto de entrada (ejecuta la app)
│ └─ assets/
│ └─ tech.png # Imagen usada en la UI
│
├─ README.md # Este archivo
├─ .gitignore # Ignora env, __pycache__, etc.
└─ ...
- Clonar este repositorio:
git clone https://github.com/CarlosGiles/FletMantenimientoYRedes.git cd FletMantenimientoYRedes - Crear y/o activar un entorno virtual (opcional pero recomendado):
python -m venv env source env/bin/activate # En Linux/Mac # o en Windows: .\env\Scripts\activate
- Instalar dependencias:
pip install flet
- Ejecutar la aplicación:
python src/main.py
- Se abrirá una ventana de escritorio en modo oscuro con todas las opciones de mantenimiento.
Nota: Si en vez de la ventana nativa te abre el navegador, asegúrate de estar ejecutando
python src/main.pyy noflet run. De esta forma se fuerza el modo de escritorio.
Una vez iniciada, verás el menú principal con botones para:
- Eliminar archivos temporales (C:\Windows\Temp)
- Eliminar archivos temporales locales (%LOCALAPPDATA%\Temp)
- Configurar IP dinámica (DHCP)
- Asignar IP estática - Hogar (192.168.1.200)
- Asignar IP estática - Oficina (192.168.100.200)
- Vaciar Papelera de reciclaje
Al presionar cada botón, la aplicación ejecuta la acción en un hilo de fondo, para que la interfaz no se congele. El resultado se muestra en la parte inferior (texto de resultado_text).
Si deseas distribuir la aplicación sin requerir que los usuarios instalen Python y Flet manualmente, puedes:
flet build apk -v
For more details on building and signing .apk or .aab, refer to the Android Packaging Guide.
flet build ipa -v
For more details on building and signing .ipa, refer to the iOS Packaging Guide.
flet build macos -v
For more details on building macOS package, refer to the macOS Packaging Guide.
flet build linux -v
For more details on building Linux package, refer to the Linux Packaging Guide.
flet build windows -v
For more details on building Windows package, refer to the Windows Packaging Guide.
Run as a desktop app:
uv run flet run
Run as a web app:
uv run flet run --web
Install dependencies from pyproject.toml:
poetry install
Run as a desktop app:
poetry run flet run
Run as a web app:
poetry run flet run --web
For more details on running the app, refer to the Getting Started Guide.
- Flet: Documentación oficial
- netsh: Documentación Microsoft
- ipconfig: Para liberar y renovar direcciones IP.
- PowerShell: Para vaciar la papelera (
Clear-RecycleBin).
- Rutas Largas en Windows: Al compilar, ten en cuenta activar el Modo Desarrollador y minimizar la profundidad de las rutas.
- Dependencias: Asegúrate de incluir en el
pyproject.tomlcada librería externa (p. ej.yt_dlp) para que se empaquete correctamente. - Escalabilidad: Dado que Flet usa
Flutterpor debajo, se pueden añadir animaciones, más UI, y adaptarlo a web, escritorio, y móvil.
MIT License Copyright (c) 2025 Carlos Giles Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
¡Gracias por usar FletMantenimientoYRedes!
Siéntete libre de hacer fork, proponer cambios o mejoras en pull requests.
