Skip to content
Pressentify
Home
Learn
Handbooks
32 print-ready volumes across 6 handbooks
7 volumes
System Design
2 volumes
AWS Production
4 volumes
Python
6 volumes
FastAPI
7 volumes
AI Full-Stack
6 volumes
Django
Topics
14 courses, beginner to production
Python
PostgreSQL
System Design
Django
MongoDB
AWS
AI Full-Stack
Data Structures & Algorithms
JavaScript
React
Docker
FastAPI
Next.js
MySQL
Cheatsheets
8 one-page quick references
Python
PostgreSQL
System Design
Django
MongoDB
AWS
AI Full-Stack
Data Structures & Algorithms
DSA Lab
12 animated lessons, synced to running code
Binary Search
Two Pointers
Maximum Subarray (Kadane’s)
Move Zeroes
Minimum Size Subarray Sum
Roadmap
Study planner
Job hunt
AI Interview
Blog
Sign in
Get started
Cheatsheets
/
Python
Python cheat sheets
60 sheets · 39 sections
Quick reference
Full course
01
Python Fundamentals
4 sheets
Core language
Variables, objects, names, and references
Strings
f-strings
Lists
Dictionaries
Slicing
Unpacking
Comprehensions
Generator expressions
Truthiness
is vs ==
Mutable vs immutable objects
Functions
Defining functions
Keyword arguments
Default arguments
*args
**kwargs
First-class functions
Closures
Scope and LEGB
Positional arguments
Keyword-only arguments
Positional-only arguments
Higher-order functions
Built-ins worth knowing well
enumerate
zip
sorted
any and all
sum and len
map
range
min and max
iter and next
isinstance and issubclass
hasattr, getattr, and setattr
callable
Modules and imports
Modules
Absolute and relative imports
__name__ and the __main__ guard
Packages
Import resolution and caching
__init__.py
Circular imports
sys.path
02
Object-Oriented Python
5 sheets
OOP fundamentals
Classes and objects
Constructors
Inheritance
Instance attributes
Class attributes
Instance methods
Class methods
Static methods
Polymorphism
Composition
Aggregation
Composition vs inheritance
Abstract classes and interfaces
The abc module
ABC
@abstractmethod
Python's duck typing
Protocols
Structural typing
Properties
@property
Property setters
Property deleters
Computed properties
Dunder methods
__new__ and __init__
__str__ and __repr__
__eq__ and __ne__
__lt__ and __le__
__gt__ and __ge__
__hash__
__bool__
__len__ and __contains__
__iter__ and __next__
__getitem__ and __setitem__
__enter__ and __exit__
__call__
Advanced OOP
MRO, multiple inheritance, and super()
Mixins
Descriptors
__getattribute__, __getattr__, and __setattr__
__slots__
Metaclasses
03
Python Internals
3 sheets
Object model
Everything is an object
Names vs objects, and references
Object identity
Equality
Mutability and immutability
Hashability (the default, identity-based hash)
Object lifecycle
Memory management
Reference counting
Garbage collection
Cyclic references
Memory allocation and object overhead
Stack vs heap (conceptual model)
Weak references
Interning
Copying objects: shallow copy vs deep copy
Execution model
Function calls
Call stack and frames
Local and global namespaces
Closures (the cell mechanism)
Free variables
Late binding
Bytecode and CPython (conceptual understanding)
04
Functional Programming
1 sheet
Functional Programming
Pure functions
Function composition
reduce
functools.partial
functools
Lazy evaluation
Generator pipelines
Immutability concepts
05
Decorators
1 sheet
Decorators
Function decorators
Decorators with arguments
Method decorators
Class decorators
Stacked decorators
functools.wraps
Callable objects
Decorator factories
06
Iterators and Generators
1 sheet
Iterators and Generators
Iterable vs iterator
Iterator protocol
Generator functions and yield
yield from
Lazy evaluation
Generator pipelines
Memory-efficient processing
Sending values into generators
Generator cleanup
07
Exception Handling
2 sheets
Fundamentals
Exception hierarchy
try / except
else clause
finally clause
raise
raise ... from ...
Exception chaining
Custom exceptions
Multiple exception types
Production error handling
Exception boundaries
Error propagation
Retryable errors
Non-retryable errors
Timeouts
Retry strategies
Exponential backoff
Logging exceptions
User-facing vs internal errors
Avoiding swallowed exceptions
08
Context Managers
1 sheet
Context Managers
The with statement
The contextlib module
@contextlib.contextmanager
Nested context managers
Async context managers and async with
Why context managers matter
09
Type Hints and Static Typing
2 sheets
Core typing
Basic annotations
Generic collection annotations
Optional and Union types
Any, Literal, and Final
Callable
TypeVar and Generic
TypeAlias and Annotated
Advanced typing
TypedDict
Type narrowing and type guards
Writing generic classes and functions
Variance (conceptual)
10
Dataclasses and Data Modeling
1 sheet
Dataclasses and Data Modeling
@dataclass
Frozen dataclasses
Default values, default_factory, and field()
Post-init processing
Ordering
Dataclass inheritance
slots=True
Dataclasses vs regular classes vs Pydantic models, and value objects
11
Standard Library
1 sheet
Standard Library
collections
itertools
functools
pathlib
datetime and zoneinfo
asyncio
concurrent.futures
logging
re (regular expressions)
json
enum
System interaction: os, sys, subprocess
12
Concurrency and Parallelism
3 sheets
Concepts
Concurrency vs parallelism
CPU-bound vs I/O-bound workloads
Multithreading, multiprocessing, and pools — an overview
Asynchronous programming
Threading
threading and Thread
Lock and RLock
Event, Condition, and Semaphore
Thread safety and thread-safe data structures
Race conditions, deadlocks, and starvation
GIL
What the GIL is, and why it exists
The GIL in practice — CPU-bound vs. I/O-bound, and what to reach for
13
Async Python
1 sheet
Async Python
Event loop and coroutines
Awaitables, Tasks, and Futures
Scheduling with asyncio.gather
Cancellation and timeouts
Async context managers
Async iterators and async generators
Semaphores and async locks
Blocking code inside async applications
Async HTTP/database clients and connection pooling
Backpressure and concurrency limits
Graceful cancellation
Choosing threading, multiprocessing, or asyncio
14
Testing
3 sheets
pytest
Test discovery and assertions
Fixtures and fixture scopes
Parametrization
Marks and plugins
Async tests, conftest.py, and test configuration
Mocking
Mock and MagicMock
patch and AsyncMock
Monkeypatching
Test doubles: stubs, spies, and fakes
Knowing what should (and should not) be mocked
Quality
Coverage
Test isolation and determinism
Database test isolation and external service testing
Testing failure scenarios
15
Python Packaging
1 sheet
Python Packaging
pip and venv
pyproject.toml and package layout
Build systems and wheels
Source distributions and editable installs
Dependencies, pinning, and ranges
Semantic versioning
Transitive dependencies and dependency conflicts
Private packages and internal package registries
Publishing packages
Why pyproject.toml over legacy setup.py
16
Dependency and Environment Management
1 sheet
Dependency and Environment Management
Virtual environments and Python version management
Development vs. production dependencies
Environment variables and .env files
Secrets
Lock files and reproducible environments
pip and uv
Poetry and pip-tools
Conda and pyenv (when relevant)
17
Code Quality and Tooling
2 sheets
Formatting and linting
PEP 8 and code formatters (Black, isort)
Ruff and Flake8
Pre-commit
Engineering practices
Code review, clear naming, type annotations, and documentation
Small cohesive functions, project structure, and premature abstraction
Refactoring safely and technical debt management
18
Performance
3 sheets
Fundamentals
Big-O, time complexity, and space complexity
Choosing the right data structure
CPU, memory, I/O, network, database, and serialization bottlenecks
Profiling tools
timeit and microbenchmarks
cProfile and pstats
tracemalloc, memory profilers, py-spy, and APM
Optimization
Caching and lazy evaluation
Batching, connection pooling, and query optimization
Parallelization, async I/O, and serialization optimization
Measure first, optimize second
19
Memory Optimization
1 sheet
Memory Optimization
Object overhead and references, for memory investigation
Mutable containers and large collections
Generators and iterators, for memory
__slots__, at scale
Shallow and deep copies, and their memory cost
Memory leaks, in practice
Reference cycles and garbage collection, for memory investigation
Weak references, as a memory optimization
Caching side effects
Memory profiling, in practice
20
Logging and Observability
1 sheet
Logging and Observability
Logging levels, handlers, and formatters
Structured and JSON logging
Correlation IDs, request IDs, and stack traces
Metrics and distributed tracing
Health, readiness, and liveness checks
21
Web and HTTP Fundamentals
2 sheets
HTTP
HTTP methods
HTTP status codes
HTTP headers
Cookies and sessions
Content negotiation, compression, caching, and connection reuse
Security-related web concepts
CORS (Cross-Origin Resource Sharing)
CSRF (Cross-Site Request Forgery)
XSS (Cross-Site Scripting)
HTTPS, TLS, and the same-origin policy
22
API Development
1 sheet
API Development
REST and resource modeling
Request validation and response serialization
Error responses
Pagination, filtering, sorting, and search
API versioning
Idempotency keys and rate limiting
Authentication and authorization in APIs
OpenAPI, Swagger, and API documentation
Backward compatibility
26
Redis
1 sheet
Redis
Key-value storage and strings
Lists
Sets and sorted sets
Hashes
TTL and expiration
Atomic operations
Pub/Sub and Streams
Distributed locks
Caching
27
Caching
1 sheet
Caching
Why caching is needed, and in-memory cache
Redis cache
Cache-aside, write-through, and write-back
TTL and cache invalidation
Cache stampede
Cache warming
Distributed caching
Cache consistency
Cache failure behavior
30
Background Jobs and Task Queues
1 sheet
Background Jobs and Task Queues
Task queue tools landscape
Job queues and workers
Retries and exponential backoff
Dead-letter queues
Job scheduling and delayed jobs
Worker concurrency
At-least-once delivery, duplicate processing, and idempotency
Job monitoring and failure recovery
32
Architecture and Design Patterns
2 sheets
Common architecture styles
Layered, modular monolith, clean, and hexagonal architecture
Domain-driven design fundamentals
Microservices and event-driven architecture
Patterns
Factory and Abstract Factory
Strategy
Adapter
Repository
Service Layer
Dependency Injection (pattern catalog entry)
Observer
Command
Builder
Decorator (structural pattern)
33
Dependency Injection
1 sheet
Dependency Injection
Dependency inversion
Constructor injection
Function injection
Dependency containers
FastAPI dependency injection
Testing with injected dependencies
Avoiding hidden global dependencies
34
Linux
1 sheet
Linux
Processes, PIDs, and threads
Signals
File permissions, users, and groups
Environment variables and the filesystem
Process inspection: ps, top, htop, lsof, kill
Text processing: grep, awk, sed
curl and wget
Remote access and scheduling: ssh, scp, systemd, cron
35
Networking
1 sheet
Networking
TCP/IP, IP addresses, and ports
Sockets
TCP vs UDP
DNS
HTTP, HTTPS, and TLS in the protocol stack
Reverse proxy and load balancer
Connection pooling and timeouts
Proxies and NAT
WebSockets and Server-Sent Events (SSE)
37
ASGI, WSGI, Uvicorn and Gunicorn
1 sheet
ASGI, WSGI, Uvicorn and Gunicorn
WSGI vs ASGI
Uvicorn
Gunicorn
Workers, worker processes, and threads
Reverse proxies in front of a WSGI/ASGI app
Application lifecycle, graceful shutdown, and connection handling
42
Monitoring and Production Operations
1 sheet
Monitoring and Production Operations
Metrics, logs, and traces (the ops layer)
Health checks (in the ops loop)
Alerts and dashboards
SLOs, SLIs, and error budgets
Incident response and root cause analysis
Postmortems
Graceful degradation
Rollbacks
43
API Reliability
1 sheet
API Reliability
Timeouts
Retries, exponential backoff, and jitter
Circuit breakers
Rate limiting as a client-side reliability defense
Idempotency as what makes a retry safe
Request validation and input limits
Connection pooling as part of the resilience picture
Bulkheads
Graceful degradation and fallbacks
44
Data Serialization
1 sheet
Data Serialization
JSON
Pickle — including security risks
Binary serialization formats: MessagePack, Protocol Buffers, Avro
CSV
YAML
Serialization/deserialization costs
Schema evolution and backward compatibility
45
CLI and Automation
1 sheet
CLI and Automation
CLI application structure
Environment variables and exit codes
Subprocesses and shell integration
Scheduling and cron
Automation scripts and maintenance scripts
Data migrations
Batch jobs
Deployment tooling and developer tooling
46
File and Resource Handling
1 sheet
File and Resource Handling
File modes, binary vs. text files, and encoding
Streaming files and large-file processing
Temporary files
File permissions
Compression and archives
Resource cleanup
47
Date and Time
1 sheet
Date and Time
datetime, date, time, and timedelta
Time zones, UTC, and zoneinfo
Naive vs. aware datetimes
ISO 8601, Unix timestamps, and date serialization
Daylight saving time transitions
48
Networking and HTTP Clients
1 sheet
Networking and HTTP Clients
requests, httpx, and aiohttp
Building a resilient client: pooling, timeouts, retries
Authentication and headers
Streaming responses
Async HTTP clients
HTTP status handling in a client
Response validation
Proxy configuration and TLS verification
50
Senior-Level Engineering Skills
1 sheet
Senior-Level Engineering Skills
Architecture reviews
Technical documentation
Debugging production incidents
Estimating engineering work
Breaking large tasks into smaller pieces
Identifying technical debt
Refactoring legacy systems
Migration strategies
Database migrations
Safe deployments
Mentoring junior developers
Communicating technical trade-offs
51
What a 5-Year Python Engineer Should Be Able to Explain
2 sheets
Python
How Python passes objects to functions
Database
What an index is, and when it hurts
What a transaction is, and what isolation means
What causes database deadlocks
How to optimize a slow query
SQL vs NoSQL
When would you use Redis?
01
Python Fundamentals
4 sheets
Core language
Variables, objects, names, and references
Strings
f-strings
Lists
Dictionaries
Slicing
Unpacking
Comprehensions
Generator expressions
Truthiness
is vs ==
Mutable vs immutable objects
Functions
Defining functions
Keyword arguments
Default arguments
*args
**kwargs
First-class functions
Closures
Scope and LEGB
Positional arguments
Keyword-only arguments
Positional-only arguments
Higher-order functions
Built-ins worth knowing well
enumerate
zip
sorted
any and all
sum and len
map
range
min and max
iter and next
isinstance and issubclass
hasattr, getattr, and setattr
callable
Modules and imports
Modules
Absolute and relative imports
__name__ and the __main__ guard
Packages
Import resolution and caching
__init__.py
Circular imports
sys.path
07
Exception Handling
2 sheets
Fundamentals
Exception hierarchy
try / except
else clause
finally clause
raise
raise ... from ...
Exception chaining
Custom exceptions
Multiple exception types
Production error handling
Exception boundaries
Error propagation
Retryable errors
Non-retryable errors
Timeouts
Retry strategies
Exponential backoff
Logging exceptions
User-facing vs internal errors
Avoiding swallowed exceptions
12
Concurrency and Parallelism
3 sheets
Concepts
Concurrency vs parallelism
CPU-bound vs I/O-bound workloads
Multithreading, multiprocessing, and pools — an overview
Asynchronous programming
Threading
threading and Thread
Lock and RLock
Event, Condition, and Semaphore
Thread safety and thread-safe data structures
Race conditions, deadlocks, and starvation
GIL
What the GIL is, and why it exists
The GIL in practice — CPU-bound vs. I/O-bound, and what to reach for
16
Dependency and Environment Management
1 sheet
Dependency and Environment Management
Virtual environments and Python version management
Development vs. production dependencies
Environment variables and .env files
Secrets
Lock files and reproducible environments
pip and uv
Poetry and pip-tools
Conda and pyenv (when relevant)
17
Code Quality and Tooling
2 sheets
Formatting and linting
PEP 8 and code formatters (Black, isort)
Ruff and Flake8
Pre-commit
Engineering practices
Code review, clear naming, type annotations, and documentation
Small cohesive functions, project structure, and premature abstraction
Refactoring safely and technical debt management
20
Logging and Observability
1 sheet
Logging and Observability
Logging levels, handlers, and formatters
Structured and JSON logging
Correlation IDs, request IDs, and stack traces
Metrics and distributed tracing
Health, readiness, and liveness checks
26
Redis
1 sheet
Redis
Key-value storage and strings
Lists
Sets and sorted sets
Hashes
TTL and expiration
Atomic operations
Pub/Sub and Streams
Distributed locks
Caching
30
Background Jobs and Task Queues
1 sheet
Background Jobs and Task Queues
Task queue tools landscape
Job queues and workers
Retries and exponential backoff
Dead-letter queues
Job scheduling and delayed jobs
Worker concurrency
At-least-once delivery, duplicate processing, and idempotency
Job monitoring and failure recovery
34
Linux
1 sheet
Linux
Processes, PIDs, and threads
Signals
File permissions, users, and groups
Environment variables and the filesystem
Process inspection: ps, top, htop, lsof, kill
Text processing: grep, awk, sed
curl and wget
Remote access and scheduling: ssh, scp, systemd, cron
42
Monitoring and Production Operations
1 sheet
Monitoring and Production Operations
Metrics, logs, and traces (the ops layer)
Health checks (in the ops loop)
Alerts and dashboards
SLOs, SLIs, and error budgets
Incident response and root cause analysis
Postmortems
Graceful degradation
Rollbacks
45
CLI and Automation
1 sheet
CLI and Automation
CLI application structure
Environment variables and exit codes
Subprocesses and shell integration
Scheduling and cron
Automation scripts and maintenance scripts
Data migrations
Batch jobs
Deployment tooling and developer tooling
48
Networking and HTTP Clients
1 sheet
Networking and HTTP Clients
requests, httpx, and aiohttp
Building a resilient client: pooling, timeouts, retries
Authentication and headers
Streaming responses
Async HTTP clients
HTTP status handling in a client
Response validation
Proxy configuration and TLS verification
02
Object-Oriented Python
5 sheets
OOP fundamentals
Classes and objects
Constructors
Inheritance
Instance attributes
Class attributes
Instance methods
Class methods
Static methods
Polymorphism
Composition
Aggregation
Composition vs inheritance
Abstract classes and interfaces
The abc module
ABC
@abstractmethod
Python's duck typing
Protocols
Structural typing
Properties
@property
Property setters
Property deleters
Computed properties
Dunder methods
__new__ and __init__
__str__ and __repr__
__eq__ and __ne__
__lt__ and __le__
__gt__ and __ge__
__hash__
__bool__
__len__ and __contains__
__iter__ and __next__
__getitem__ and __setitem__
__enter__ and __exit__
__call__
Advanced OOP
MRO, multiple inheritance, and super()
Mixins
Descriptors
__getattribute__, __getattr__, and __setattr__
__slots__
Metaclasses
06
Iterators and Generators
1 sheet
Iterators and Generators
Iterable vs iterator
Iterator protocol
Generator functions and yield
yield from
Lazy evaluation
Generator pipelines
Memory-efficient processing
Sending values into generators
Generator cleanup
10
Dataclasses and Data Modeling
1 sheet
Dataclasses and Data Modeling
@dataclass
Frozen dataclasses
Default values, default_factory, and field()
Post-init processing
Ordering
Dataclass inheritance
slots=True
Dataclasses vs regular classes vs Pydantic models, and value objects
11
Standard Library
1 sheet
Standard Library
collections
itertools
functools
pathlib
datetime and zoneinfo
asyncio
concurrent.futures
logging
re (regular expressions)
json
enum
System interaction: os, sys, subprocess
14
Testing
3 sheets
pytest
Test discovery and assertions
Fixtures and fixture scopes
Parametrization
Marks and plugins
Async tests, conftest.py, and test configuration
Mocking
Mock and MagicMock
patch and AsyncMock
Monkeypatching
Test doubles: stubs, spies, and fakes
Knowing what should (and should not) be mocked
Quality
Coverage
Test isolation and determinism
Database test isolation and external service testing
Testing failure scenarios
19
Memory Optimization
1 sheet
Memory Optimization
Object overhead and references, for memory investigation
Mutable containers and large collections
Generators and iterators, for memory
__slots__, at scale
Shallow and deep copies, and their memory cost
Memory leaks, in practice
Reference cycles and garbage collection, for memory investigation
Weak references, as a memory optimization
Caching side effects
Memory profiling, in practice
21
Web and HTTP Fundamentals
2 sheets
HTTP
HTTP methods
HTTP status codes
HTTP headers
Cookies and sessions
Content negotiation, compression, caching, and connection reuse
Security-related web concepts
CORS (Cross-Origin Resource Sharing)
CSRF (Cross-Site Request Forgery)
XSS (Cross-Site Scripting)
HTTPS, TLS, and the same-origin policy
32
Architecture and Design Patterns
2 sheets
Common architecture styles
Layered, modular monolith, clean, and hexagonal architecture
Domain-driven design fundamentals
Microservices and event-driven architecture
Patterns
Factory and Abstract Factory
Strategy
Adapter
Repository
Service Layer
Dependency Injection (pattern catalog entry)
Observer
Command
Builder
Decorator (structural pattern)
35
Networking
1 sheet
Networking
TCP/IP, IP addresses, and ports
Sockets
TCP vs UDP
DNS
HTTP, HTTPS, and TLS in the protocol stack
Reverse proxy and load balancer
Connection pooling and timeouts
Proxies and NAT
WebSockets and Server-Sent Events (SSE)
43
API Reliability
1 sheet
API Reliability
Timeouts
Retries, exponential backoff, and jitter
Circuit breakers
Rate limiting as a client-side reliability defense
Idempotency as what makes a retry safe
Request validation and input limits
Connection pooling as part of the resilience picture
Bulkheads
Graceful degradation and fallbacks
47
Date and Time
1 sheet
Date and Time
datetime, date, time, and timedelta
Time zones, UTC, and zoneinfo
Naive vs. aware datetimes
ISO 8601, Unix timestamps, and date serialization
Daylight saving time transitions
51
What a 5-Year Python Engineer Should Be Able to Explain
2 sheets
Python
How Python passes objects to functions
Database
What an index is, and when it hurts
What a transaction is, and what isolation means
What causes database deadlocks
How to optimize a slow query
SQL vs NoSQL
When would you use Redis?
03
Python Internals
3 sheets
Object model
Everything is an object
Names vs objects, and references
Object identity
Equality
Mutability and immutability
Hashability (the default, identity-based hash)
Object lifecycle
Memory management
Reference counting
Garbage collection
Cyclic references
Memory allocation and object overhead
Stack vs heap (conceptual model)
Weak references
Interning
Copying objects: shallow copy vs deep copy
Execution model
Function calls
Call stack and frames
Local and global namespaces
Closures (the cell mechanism)
Free variables
Late binding
Bytecode and CPython (conceptual understanding)
04
Functional Programming
1 sheet
Functional Programming
Pure functions
Function composition
reduce
functools.partial
functools
Lazy evaluation
Generator pipelines
Immutability concepts
05
Decorators
1 sheet
Decorators
Function decorators
Decorators with arguments
Method decorators
Class decorators
Stacked decorators
functools.wraps
Callable objects
Decorator factories
08
Context Managers
1 sheet
Context Managers
The with statement
The contextlib module
@contextlib.contextmanager
Nested context managers
Async context managers and async with
Why context managers matter
09
Type Hints and Static Typing
2 sheets
Core typing
Basic annotations
Generic collection annotations
Optional and Union types
Any, Literal, and Final
Callable
TypeVar and Generic
TypeAlias and Annotated
Advanced typing
TypedDict
Type narrowing and type guards
Writing generic classes and functions
Variance (conceptual)
13
Async Python
1 sheet
Async Python
Event loop and coroutines
Awaitables, Tasks, and Futures
Scheduling with asyncio.gather
Cancellation and timeouts
Async context managers
Async iterators and async generators
Semaphores and async locks
Blocking code inside async applications
Async HTTP/database clients and connection pooling
Backpressure and concurrency limits
Graceful cancellation
Choosing threading, multiprocessing, or asyncio
15
Python Packaging
1 sheet
Python Packaging
pip and venv
pyproject.toml and package layout
Build systems and wheels
Source distributions and editable installs
Dependencies, pinning, and ranges
Semantic versioning
Transitive dependencies and dependency conflicts
Private packages and internal package registries
Publishing packages
Why pyproject.toml over legacy setup.py
18
Performance
3 sheets
Fundamentals
Big-O, time complexity, and space complexity
Choosing the right data structure
CPU, memory, I/O, network, database, and serialization bottlenecks
Profiling tools
timeit and microbenchmarks
cProfile and pstats
tracemalloc, memory profilers, py-spy, and APM
Optimization
Caching and lazy evaluation
Batching, connection pooling, and query optimization
Parallelization, async I/O, and serialization optimization
Measure first, optimize second
22
API Development
1 sheet
API Development
REST and resource modeling
Request validation and response serialization
Error responses
Pagination, filtering, sorting, and search
API versioning
Idempotency keys and rate limiting
Authentication and authorization in APIs
OpenAPI, Swagger, and API documentation
Backward compatibility
27
Caching
1 sheet
Caching
Why caching is needed, and in-memory cache
Redis cache
Cache-aside, write-through, and write-back
TTL and cache invalidation
Cache stampede
Cache warming
Distributed caching
Cache consistency
Cache failure behavior
33
Dependency Injection
1 sheet
Dependency Injection
Dependency inversion
Constructor injection
Function injection
Dependency containers
FastAPI dependency injection
Testing with injected dependencies
Avoiding hidden global dependencies
37
ASGI, WSGI, Uvicorn and Gunicorn
1 sheet
ASGI, WSGI, Uvicorn and Gunicorn
WSGI vs ASGI
Uvicorn
Gunicorn
Workers, worker processes, and threads
Reverse proxies in front of a WSGI/ASGI app
Application lifecycle, graceful shutdown, and connection handling
44
Data Serialization
1 sheet
Data Serialization
JSON
Pickle — including security risks
Binary serialization formats: MessagePack, Protocol Buffers, Avro
CSV
YAML
Serialization/deserialization costs
Schema evolution and backward compatibility
46
File and Resource Handling
1 sheet
File and Resource Handling
File modes, binary vs. text files, and encoding
Streaming files and large-file processing
Temporary files
File permissions
Compression and archives
Resource cleanup
50
Senior-Level Engineering Skills
1 sheet
Senior-Level Engineering Skills
Architecture reviews
Technical documentation
Debugging production incidents
Estimating engineering work
Breaking large tasks into smaller pieces
Identifying technical debt
Refactoring legacy systems
Migration strategies
Database migrations
Safe deployments
Mentoring junior developers
Communicating technical trade-offs