asyncio Streams: Reader, Writer, and TCP
Read and write asynchronous TCP protocols with high-level APIs and explicit bounds.
Clean code, automated testing, and design patterns
Read and write asynchronous TCP protocols with high-level APIs and explicit bounds.
Protect shared state between tasks and notify waiters when a condition becomes ready.
Forward a complete callable signature through a higher-order function.
Express that an input accepts specific values rather than every string or integer.
Create a unique directory per test and use it as a pathlib.Path object.
Prove that invalid input fails in the expected way and at the expected point.
Set deadlines for coroutines and stop tasks cooperatively without leaking connections or hiding cancellation.
Assert meaningful log events without depending on timestamps or unstable formatting.
Describe how return types depend on arguments without duplicating the runtime implementation.
Compute reproducible digests that detect file changes without loading entire files into memory.
Replay HTTP integrations from versioned cassettes without exposing tokens or turning sensitive data into fixtures.
Preserve relationships between inputs and outputs with type variables and bounds that match the actual contract.