#python
Explore materials tagged "python" from expert practitioners. Up-to-date articles and useful tips to help you grow.
Articles with tag "#python"
All materials on the topic python
Google GenAI SDK in Python: synchronous and asynchronous calls
The official google-genai package lets Python applications call Gemini without assembling HTTP requests by hand. This guide works for FastAPI...
if __name__ == "__main__": the Python entry point
The if name == "main" guard defines a Python program's entry point: it distinguishes direct file execution from importing the...
strip() and lower(): Preparing User Text π§Ή
A user may enter the correct word with extra spaces or different letter case. Python treats "Alpha", " Alpha ",...
ord(), chr(), and Cyclic Letter Shifts in Python π
A string contains characters, but a computer stores every character as a numeric code. Python provides two built-in functions for...
How Functions Work Together in Python π§©
A small function normally handles one clear task. A real program, however, contains several tasks: receive data, process it, display...
ANSI Color Table for Python π¨
ANSI escape codes can change terminal text colors. Print a color code before the text and a reset code after...
Event Loop in Python: How asyncio Enables Concurrent Execution
Event loop is the heart of asyncio. It doesn't run code in parallel across multiple threads. Instead, it switches between...
pytest-django: Testing Django
Covered topics: Installation, @pytest.mark.djangodb, Fixtures, Testing views.
pip: Python Package Manager
Covered topics: Installing packages, Upgrading and removing, requirements.txt, Virtual environment.
run_in_executor and anyio: Sync Libraries in Async Code
Sometimes you need to call a synchronous library from async code without blocking the event loop.
Async Context Managers: async with and @asynccontextmanager
Async context managers manage resources in async code β connections, files, transactions.
pathlib: Working with Paths in Python
pathlib is the modern way to work with filesystem paths instead of plain strings.
Similar tags
Study related topics
Looking for more on the topic?
Study all our materials or subscribe to updates