title | emoji | colorFrom | colorTo | sdk | tags | fullwidth | license | app_port | |
---|---|---|---|---|---|---|---|---|---|
Python Project Template |
🟧 |
yellow |
purple |
docker |
|
true |
mit |
7860 |
A modern Python project template with best practices for development, testing, and deployment.
- Modern Python (3.11+) project structure
- Development tools configuration (pytest, black, isort, mypy, ruff)
- Docker support
- GitHub Actions ready
- Comprehensive documentation structure
- Jupyter notebook support
.
├── docs/ # Documentation files
├── notebooks/ # Jupyter notebooks
├── src/ # Source code
│ ├── common/ # Common utilities and shared code
│ ├── modules/ # Feature modules
│ │ └── api/ # API related code
│ ├── shared/ # Shared resources
│ └── utils/ # Utility functions
└── tests/ # Test files
- Python 3.11 or higher
- uv for dependency management
- Clone the repository:
git clone https://github.com/yourusername/template-python.git
cd template-python
- Create a virtual environment and install dependencies:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
- Copy the environment file and adjust as needed:
cp .env.example .env
This project uses several development tools:
- pytest: Testing framework
- black: Code formatting
- isort: Import sorting
- mypy: Static type checking
- ruff: Fast Python linter
Run tests:
pytest
Format code:
black .
isort .
Run type checking:
mypy src tests
Run linting:
ruff check .
Build the Docker image:
make build
Run the container:
make run
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.