Generador de requirements.txt avanzado para Django con análisis estático y dinámico.
Project description
django-req-generator 🚀
Generador avanzado de requirements.txt / Advanced requirements.txt generator
🇲🇽 Español
Descripción
Este plugin para Django sirve para empaquetar tu proyecto e instalarlo de forma limpia en otros entornos (Docker, Servidores de Producción, CI/CD). Está específicamente diseñado para manejar proyectos Django complejos donde no basta con un simple pip freeze.
Características Principales
- 🔍 Análisis Estático (AST): Detecta imports reales en todo el árbol de tu código fuente.
- 🧩 Inspección Profunda de Django: Analiza
INSTALLED_APPS,MIDDLEWARE,DATABASES(detecta drivers comooracledb), yCACHES(detectadjango-redisypymemcache). - 🧹 Limpieza Automática: Filtra la librería estándar de Python y tus propios módulos locales (
apps,models,serializers, etc.). - 🔗 Resolución Dinámica PyPI: No usa mapeos manuales fallidos; pregunta directamente a la API de PyPI para encontrar el paquete correcto.
- 🤖 Auto-curación Interactiva: Durante la validación, si detecta un módulo faltante (
ModuleNotFoundError), te pregunta si quieres añadirlo y reintenta la validación en caliente. - 🧪 Validación en Venv: Crea un entorno virtual temporal para asegurar que el archivo generado permite que el proyecto arranque.
- 🌎 Multilingüe: Soporta comandos y mensajes en Español e Inglés.
Uso
# Generación estándar con backup automático
python manage.py generate_reqs
# Generación con validación y settings específicos
python manage.py generate_reqs --validate --settings=mi_proyecto.settings_docker
# Modo Desarrollo (instala el plugin desde código fuente en la validación)
python manage.py generate_reqs --validate -d /ruta/al/plugin
🇺🇸 English
Description
This Django plugin is designed to package your project and install it cleanly in other environments (Docker, Production Servers, CI/CD). It is specifically built for complex Django projects where a simple pip freeze isn't enough.
Key Features
- 🔍 Static Analysis (AST): Deep-scans your entire source code to detect actual imports.
- 🧩 Deep Django Inspection: Analyzes
INSTALLED_APPS,MIDDLEWARE,DATABASES(detects drivers likeoracledb), andCACHES(detectsdjango-redisandpymemcache). - 🧹 Automatic Cleanup: Filters out Python's standard library and your own local modules (
apps,models,serializers, etc.). - 🔗 Dynamic PyPI Resolution: Replaces outdated manual mappings by querying the PyPI API directly for the correct package name.
- 🤖 Interactive Self-Healing: During validation, if a missing module is found (
ModuleNotFoundError), it asks if you want to add it and retries the validation on the fly. - 🧪 Venv Validation: Creates a temporary virtual environment to ensure the generated file allows the project to start.
- 🌎 Multilingual: Supports commands and console messages in both Spanish and English.
Usage
# Standard generation with automatic backup
python manage.py generate_reqs
# Generation with validation and specific settings
python manage.py generate_reqs --validate --settings=my_project.settings_docker
# Development Mode (installs plugin from source during validation)
python manage.py generate_reqs --validate -d /path/to/plugin
Made with ❤️ and AI Collaboration | Creado con ❤️ y el apoyo de IA
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
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 django_req_generator-0.1.1.tar.gz.
File metadata
- Download URL: django_req_generator-0.1.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
582a2b32404b7aaa24cca3e0468dc8df8f2d00bc9f6fd3da8b427ba6f49f4bfe
|
|
| MD5 |
4fe779c9f690bd0425abbe4ffd452da7
|
|
| BLAKE2b-256 |
33eeba86a749684e580534964b50f70f9de418ed54ba1107a279e3161b30f2d0
|
File details
Details for the file django_req_generator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_req_generator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2843559a66883691d471518f8bf3a0be10e9d90100e799b7f5daf03b126b9172
|
|
| MD5 |
ec79655674055e82d81319bc757ede02
|
|
| BLAKE2b-256 |
87fc636fa63f16e79eb4d3538fa3123411760b76fd2cd608aed17efc372861c6
|