python-patterns

Guide Python development decisions on frameworks, async patterns, type hints, and project structure.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/roger8b/slideflow --skill python-patterns-roger8b
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-patterns
Source: https://github.com/roger8b/slideflow/tree/main/.agent/skills/python-patterns
Command: npx skills add https://github.com/roger8b/slideflow --skill python-patterns-roger8b

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill Unit helps developers understand and apply Python development patterns and principles, making informed decisions about frameworks, async patterns, type hints, and project structure.

Core Features & Use Cases

  • Framework Selection: Decision tree for choosing the right framework based on project type.
  • Async vs Sync: Guidance on when to use asynchronous programming.
  • Type Hints Strategy: Best practices for using type hints effectively.
  • Project Structure: Principles for structuring small to large Python projects.
  • Django Principles: Overview of Django 5.0+ async features and best practices.
  • FastAPI Principles: Integration of async features and dependency injection.
  • Background Tasks: Selection guide for background task solutions.
  • Error Handling: Strategies for error handling in FastAPI.
  • Testing Principles: Unit, integration, and end-to-end testing strategies.
  • Decision Checklist: Quick reference for making key decisions during development.

Quick Start

To get started with the python-patterns skill, read through the SKILL.md file for an overview of Python development principles and decision-making.

Frequently Asked Questions about python-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right Python framework for my project type?

Choosing the right Python framework involves using a decision tree that evaluates project type and requirements. This guide provides a framework selection decision tree to match your specific project constraints with the optimal architecture.

When should I use async vs sync patterns in Python development?

You should use async patterns in Python when handling I/O-bound operations, and sync patterns for CPU-bound tasks. The guide provides explicit guidance on when to adopt asynchronous programming based on your application's workload characteristics.

What are the best practices for using type hints effectively in Python?

Best practices for type hints involve applying them strategically to improve code reliability and maintainability. This skill outlines a type hints strategy to help you enforce type safety without over-complicating your codebase.

How should I structure a large Python project?

Structuring a large Python project requires following specific principles to ensure scalability and maintainability. The guide details project structure principles tailored for scaling from small scripts to large Python applications.

Does Django 5.0+ support async features and what are the best practices?

Django 5.0+ supports async features, and best practices involve understanding its asynchronous capabilities. The guide provides an overview of Django 5.0+ async features and principles for effective integration.

What is the best way to handle background tasks in FastAPI?

The best way to handle background tasks in FastAPI is using a dedicated selection guide for task solutions. This skill provides a background task selection guide and error handling strategies to manage FastAPI dependencies efficiently.