#Python

[ follow ]
Python
fromdaniel.feldroy.com
4 hours ago

TIL: Default code block languages for mkdocs

Set default_lang: python in mkdocs.yml using pymdownx.highlight so code blocks without language tags are highlighted as Python.
#python
Python
fromRealpython
4 days ago

Break Out of Loops With Python's break Keyword - Real Python

The break statement immediately exits the innermost loop, stopping further iterations; continue skips the current iteration but does not exit the loop.
Software development
fromEuroPython Society
1 week ago

Recognising Michael Foord as an Honorary EuroPython Society Fellow

Michael Foord was posthumously named an Honorary EuroPython Society Fellow for his technical contributions, community leadership, and enduring kindness.
#mcp
fromRealpython
3 days ago
Python

Build a Python MCP Client to Test Servers From Your Terminal - Real Python

Build a minimal MCP client in Python to connect via stdio, list server capabilities, and use server tools with OpenAI for AI-powered chat.
fromTalkpython
1 week ago
Python

MCP Servers for Python Devs

Model Context Protocol (MCP) enables a single Python service to expose tools and data across editors and agents with practical transports and enterprise-grade authorization.
fromMathspp
5 days ago

Floodfill algorithm in Python

ctx = canvas.getContext("2d") URL = "/blog/floodfill-algorithm-in-python/_python.txt" async def load_bitmap(url: str) -> list[list[int]]: # Fetch the text file from the URL response = await fetch(url) text = await response.text() bitmap: list[list[int]] = [] for line in text.splitlines(): line = line.strip() if not line: continue row = [int(ch) for ch in line if ch in "01"] if row: bitmap.append(row) return bitmap
Python
Python
fromMedium
1 week ago

How to activate virtual environment in python3

Use virtual environments to avoid pip 'externally-managed-environment' errors and prevent altering the system Python or other projects' dependencies.
Python
fromInfoWorld
1 week ago

Python vs. Mojo (and Java, Go, Rust, and .NET)

Mojo, alternative data-science languages, Python dataclasses, and a new PyTorch-related distributed-processing framework are current focal points for Python practitioners.
fromdaniel.feldroy.com
1 week ago

Visiting Tokyo, Japan from November 12 to 24

I'm excited to announce that me and Audrey will be visiting Japan from November 12 to November 24, 2025! This will be our first time in Japan, and we can't wait to explore Tokyo. Yes, we'll be in Tokyo for most of it, near the Shinjuku area, working from coffee shops, meeting some colleagues, and exploring the city during our free time.
Python
Software development
fromRealpython
2 weeks ago

Building UIs in the Terminal With Python Textual - Real Python

Textual is a Python framework for building interactive, visually appealing, and efficient terminal-based user interfaces using widgets, layouts, styling, and events.
fromWill's Blog
3 weeks ago

Open Source Project Maintenance 2025

Every October, I do a maintenance pass on all my projects. At a minimum, that involves dropping support for whatever Python version is no longer supported and adding support for the most recently released Python version. While doing that, I go through the issue tracker, answer questions, and fix whatever I can fix. Then I release new versions. Then I think about which projects I should deprecate and figure out a deprecation plan for them.
fromThepythoncodingstack
3 weeks ago

And Now You Know Your ABC

Here's the task. I want to create a class to represent a track and field event held in a competition. This entry allows you to enter the raw results as reported by the officials-the athlete's bib number and the time they clocked in a race. It then computes the event's full results. There's more we could add to make this class more complete. But I won't. You can create a list of athletes that are competing in the track and field meeting:
Running
fromRubyflow
4 weeks ago

Resolving the 'rest_framework' Module Not Found Error

The ModuleNotFoundError: No module named 'rest_framework' is a common issue faced by developers working with Django REST Framework (DRF).
fromThepythoncodingstack
1 month ago

Creating a Singleton Class in Python And Why You (Probably) Don't Need It

If you spend long enough in the programming world, you'll come across the term singleton at some point. And if you hadn't seen this term yet, well, now you have! In Python, you don't need singleton classes. Almost never. But creating one is a great exercise in understanding how Python creates objects. And discussing alternatives to a singleton class helps you explore other aspects of Python.
Python
Python
frompythontest.com
1 month ago

Python lazy imports you can use today | PythonTest

Use explicit lazy imports now to defer heavy or side-effect-prone module loading, improving startup performance across current Python versions.
Books
fromTalkpython
1 month ago

Talk Python in Production Story

A decade-long website growth produced many features and users; a detailed account explains production lessons and how those differ from typical Python DevOps practices.
Python
fromPeterbe
1 month ago

In Python, you have to specify the type and not rely on inference - Peterbe.com

TypeScript infers literal argument types causing compile-time errors for mismatched values; Python's mypy requires explicit annotations to report the same mismatches.
fromRealpython
1 month ago

Modern Python Linting With Ruff - Real Python

Linting is essential to writing clean and readable code that you can share with others. A linter, like Ruff, is a tool that analyzes your code and looks for errors, stylistic issues, and suspicious constructs. Linting allows you to address issues and improve your code quality before you commit your code and share it with others. Ruff is a modern linter that's extremely fast and has a simple interface, making it straightforward to use.
Python
Python
fromBeauty-of-imagination
1 month ago

Abusing yahi -a log based statistic tool a la awstats- to plot histograms/date series from CSV

Yahi is a pip-installable Python module that builds a single static HTML page to aggregate and analyze logs (including CSV) using regex-based parsing and aggregations.
Software development
fromMicrosoft for Python Developers Blog
1 month ago

Simplifying Resource Management in mssql-python through Context Manager - Microsoft for Python Developers Blog

mssql‑python adds context manager support for connections and cursors, enabling automatic resource cleanup and safer, cleaner SQL Server and Azure SQL interactions in Python.
Artificial intelligence
fromNature
1 month ago

Python, the movie! The origin story of the programming language comes to the silver screen

NumPy standardized numeric array handling in Python, enabling scientific computing and AI and driving widespread adoption of Python for numerical and data-science libraries.
Python
fromPycoders
1 month ago

PyCoder's Weekly | Issue #701

Multiple Python-related tools, events, and updates cover converting Python to LaTeX, MCP considerations, Playwright testing techniques, and recent Python and Django releases.
Python
fromCreative Bloq
1 month ago

Think you've seen the weirdest place to play DOOM? Think again

DOOM can be run and played inside Blender by rendering the game to an icon using Doomviz and custom icon-scaling, caching, and input handling.
#fastapi
Python
fromThepythoncodingstack
2 months ago

The Networking Event (#4 in The itertools Series * `combinations()` and `permutations()`)

Generate round-robin one-to-one meeting rotas from a list of participant names for pairwise networking.
Books
fromData School
2 months ago

Book preview: Master Machine Learning with scikit-learn

Master Machine Learning with scikit-learn is a near-complete book adapting a four-year course to train novices into skilled practitioners; first three chapters available for download.
Artificial intelligence
fromPythonshow
3 months ago

54 - Neural Networks and Data Visualization with Nicolas Rougier

Nicolas Rougier applies computational models, neural networks, and Python-based visualization tools like Glumpy and VisPy to study the brain and neurodegenerative diseases.
[ Load more ]