This directory contains example projects demonstrating various use cases for taskx.
Demonstrates basic taskx usage for a Python library or CLI tool.
Features:
- Code formatting with black
- Linting with ruff
- Type checking with mypy
- Testing with pytest
- Parallel quality checks
- Watch mode for TDD
Try it:
cd simple-python
taskx list # See all available tasks
taskx check # Run all checks in parallel
taskx dev # Watch and run tests on file changes
taskx graph # Visualize task dependenciesDemonstrates taskx for web development workflows.
Features:
- Development server with auto-reload
- Database migration management
- Docker build and deployment
- Environment-based deployment targets
- Security scanning
- Parallel build checks
Try it:
cd flask-app
taskx dev # Start development server with watch mode
taskx db-init && taskx db-migrate # Database setup
taskx docker-run # Run in container
taskx deploy-staging # Deploy to staging (after build checks)Demonstrates taskx for ML/data science workflows.
Features:
- Complete ML pipeline with dependencies
- Parallel hyperparameter tuning
- GPU training support
- Jupyter notebook integration
- MLflow tracking
- Data validation
Try it:
cd data-science
taskx pipeline # Run complete ML pipeline (download → train → evaluate)
taskx tune # Run parallel hyperparameter tuning
taskx notebook # Start Jupyter Lab
taskx graph --format mermaid > pipeline.mmd # Export pipeline diagramReal-world example demonstrating a complete data processing pipeline with live API integration.
Features:
- Fetch live cryptocurrency prices from Coinbase API
- Data validation and quality checks
- Statistical analysis and reporting
- HTML report generation
- Parallel quality checks
- Watch mode for development
- Virtual environment setup
What it does:
- Fetches real-time prices for BTC, ETH, SOL, ADA, DOT
- Validates data integrity
- Computes statistics (total value, average, min, max)
- Generates beautiful HTML reports
Try it:
cd crypto-tracker
# Setup virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Run complete pipeline
taskx run pipeline
# Run individual tasks
taskx run fetch # Fetch live prices
taskx run validate # Validate data quality
taskx run analyze # Compute statistics
taskx run report # Generate HTML report
# View the report
taskx run view # Opens report in browser
# Watch mode for development
taskx watch dev
# See task dependencies
taskx graph --task viewLearning highlights:
- Real API integration with error handling
- Multi-stage data pipeline with dependencies
- Data validation patterns
- HTML report generation
- Production-ready project structure
Run multiple commands concurrently:
[tool.taskx.tasks]
check = {
parallel = ["ruff check .", "mypy .", "pytest -q"],
description = "Run all checks in parallel"
}Auto-restart tasks on file changes:
[tool.taskx.tasks]
dev = {
cmd = "python app.py",
watch = ["*.py", "templates/**/*"],
description = "Dev server with auto-reload"
}Chain tasks with automatic ordering:
[tool.taskx.tasks]
test = { cmd = "pytest tests/" }
build = { cmd = "python -m build" }
deploy = {
depends = ["test", "build"], # Runs test → build → deploy
cmd = "sh scripts/deploy.sh"
}Use environment variables for configuration:
[tool.taskx.env]
APP_NAME = "myapp"
PORT = "8000"
[tool.taskx.tasks]
dev = { cmd = "uvicorn ${APP_NAME}:app --port ${PORT} --reload" }- Start with
simple-pythonto learn basic taskx concepts - Try
crypto-trackerfor a real-world data processing example - Move to
flask-appto see how taskx handles web development - Explore
data-sciencefor complex ML dependency pipelines
- Use
taskx graphto visualize dependencies - Use
taskx watch <task>for rapid development - Set
parallelfor independent tasks to speed up workflows - Use environment variables for configuration
- Add descriptions to make
taskx listmore helpful
To use taskx in your project:
# Initialize configuration
taskx init
# Edit pyproject.toml to add your tasks
# Then run with:
taskx <task-name>See the main README for full documentation.