Creating a New Project from Template
This guide provides step-by-step instructions for creating a new Python project using this template.
Method 1: Using GitHub Template (Recommended)
Step 1: Create Repository from Template
- Navigate to the template repository
- Click the "Use this template" button (green button)
- Select "Create a new repository"
- Configure your new repository:
- Repository name: Enter your project name
- Description: Brief description of your project
- Visibility: Choose Public or Private
- Include all branches: Leave unchecked (recommended)
Step 2: Clone Your New Repository
git clone https://github.com/YOUR-USERNAME/YOUR-PROJECT-NAME.git
cd YOUR-PROJECT-NAME
Method 2: Manual Setup
Step 1: Download or Clone Template
- Git Clone
- Download ZIP
git clone https://github.com/Chisanan232/Template-Python-UV-Project.git my-new-project
cd my-new-project
rm -rf .git # Remove template's git history
git init # Initialize new git repository
- Go to the template repository
- Click "Code" → "Download ZIP"
- Extract the ZIP file to your desired location
- Rename the folder to your project name
Step 2: Install uv Package Manager
- macOS
- Linux
- Windows
# Using Homebrew
brew install uv
# Or using curl
curl -LsSf https://astral.sh/uv/install.sh | sh
# Using curl
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or using pip
pip install uv
# Using PowerShell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Or using pip
pip install uv
Step 3: Initialize Project Dependencies
# Install all dependencies including dev tools
uv sync
# Or install only production dependencies
uv sync --no-dev
Next Steps
After completing the installation:
- Customize the project - See How to Run for customization steps
- Update project metadata - Modify
pyproject.toml
with your project details - Set up development environment - Configure pre-commit hooks and IDE settings
Verification
Verify your installation by running:
# Check uv installation
uv --version
# Check Python environment
uv run python --version
# Run tests to ensure everything works
uv run pytest
If all commands execute successfully, your project template is ready for development! 🎉