Python

[ follow ]
#python-314
fromRealpython
1 day ago
Python

Episode #271: Benchmarking Python 3.14 & Enabling Asyncio to Scale - The Real Python Podcast

Python
fromRealpython
2 weeks ago

Episode #269: Python 3.14: Exploring the New Features - The Real Python Podcast

Python 3.14 introduces enhanced REPL, improved error messages, deferred annotations, t-strings, Zstandard compression, subinterpreters, and multiple performance and debugging improvements.
Python
fromRealpython
2 weeks ago

Python 3.14: Cool New Features for You to Try - Real Python

Python 3.14 enhances the interactive REPL with real-time syntax highlighting, smarter autocompletion, and clearer error messages to boost developer productivity.
fromRealpython
1 day ago
Python

Episode #271: Benchmarking Python 3.14 & Enabling Asyncio to Scale - The Real Python Podcast

fromGrahamdumpleton
1 day ago

Detecting object wrappers - Graham Dumpleton

The best example of this and the reason that wrapt was created in the first place, is to instrument existing Python code to collect metrics about its performance when run in production. Since one cannot expect a customer for an application performance monitoring (APM) service to modify their code, as well as code of the third party dependencies they may use, transparently reaching in and monkey patching code at runtime is the best one can do.
Python
fromRubyflow
1 day 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).
fromRealpython
2 days ago

What Can I Do With Python? Quiz - Real Python

How well do you know the different areas where Python shines? In this quiz, you'll revisit web apps and APIs, GUI apps, CLI tools, machine learning, and more. You'll also check what Python isn't suited for and which alternatives work better. Get ready to explore the wide scope of what you can do with Python.
Python
#uv
fromInfoWorld
2 days ago

How to use Python dataclasses

Everything in Python is an object, or so the saying goes. If you want to create your own custom objects, with their own properties and methods, you use Python's class object to do it. But creating classes in Python sometimes means writing loads of repetitive, boilerplate code; for example, to set up the class instance from the parameters passed to it or to create common functions like comparison operators.
Python
#lazy-imports
fromPycoders
3 days ago
Python

PyCoder's Weekly | Issue #705

Lazy importing, Python descriptors, REPL customization, AI agent token security, and Celery async integration are key Python ecosystem topics.
frompythontest.com
1 week ago
Python

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.
fromPythonbytes
4 days ago

It's some form of Elvish

caniscrape checks a website for common anti-bot mechanisms and reports: A difficulty score (0-10) Which protections are active (e.g., Cloudflare, Akamai, hCaptcha, etc.) What tools you'll likely need (headless browsers, proxies, CAPTCHA solvers, etc.) Whether using a scraping API might be better This helps you decide the right scraping approach before you waste time building a bot that keeps getting blocked.
Python
#pandas
#wrapt
fromTalkpython
4 days ago

38 things Python developers should learn in 2025

Free-threaded CPython (PEP 703): A build mode that removes the GIL so CPU-bound threads can run in parallel. Expect ecosystem work to make C extensions safe here. (Python Enhancement Proposals (PEPs)) uv and uvx: A faster, modern installer and environment manager that makes "clean, repeatable" installs feel instant. (Astral Docs) Docker + Compose: Containers capture your app and its services so dev and prod stay in sync. (Docker Documentation)
Python
Python
fromThepythoncodingstack
4 days ago

Are Tuples More Like Lists or Strings? And Why We Don't Really Care * [Club]

Choose Python data types based on semantic meaning and intended usage, not superficial similarity; tuples serve different roles than lists or strings in code design.
fromhttps://daniel.feldroy.com
6 days ago

Using Asyncpg with FastAPI and Air

Asyncpg is the connector for PostgreSQL and asyncio-flavored Python. Here's how to use it without other libraries on FastAPI and Air projects. Recently I've been on a few projects using PostgreSQL where SQLAlchemy and SQLModel felt like overkill. Instead of using those libraries I leaned on writing SQL queries and running those directly in [asyncpg](https://pypi.org/project/asyncpg/) instead of using an ORM powered by asyncpg. Here's how I got it to work
Python
Python
fromPythonbytes
1 week ago

Python++

New Python ecosystem tools and projects include PyPI+ for package exploration, uv-ship for safer releases, performance analysis of Python 3.14, and the experimental Air framework.
Python
fromInfoWorld
1 week ago

7 newer data science tools you should be using with Python

Several lesser-known Python data-wrangling tools, including ConnectorX and DuckDB, enable faster, parallelized database loading and in-process OLAP analytics beyond Pandas/Numpy.
fromRealpython
1 week ago

Polars vs pandas: What's the Difference? Quiz - Real Python

Interactive Quiz ⋅ 10 QuestionsBy Ian Eyre
Python
fromThepythoncodingstack
1 week 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
fromRealpython
1 week ago

Python Descriptors - Real Python

Descriptors are a specific Python feature that power a lot of the magic hidden under the language's hood. If you've ever thought that Python descriptors are an advanced topic with few practical applications, then this video course is the perfect tool to help you understand this powerful feature. You'll come to understand why Python descriptors are such an interesting topic and discover the kinds of use cases where you can apply them.
Python
#asyncio
Python
fromRealpython
1 week ago

How to Use Python: Your First Steps - Real Python

Python installs on Windows, macOS, and Linux, offers a readable syntax, built-in data types, error handling, interactive REPL, and tools to start programming effectively.
Python
fromRealpython
1 week ago

How to Use Python: Your First Steps Quiz - Real Python

Practice Python fundamentals—variables, keywords, strings, and error recognition—through an eight-question, untimed quiz with scored feedback.
fromStreamHacker
1 week ago

Monitoring Celery Tasks with Sentry

Sentry is a great tool for monitoring celery tasks, and alerting when they fail or don't run on time. But it requires a bit of work to setup properly. Below is some sample code for setting up sentry monitoring of periodic tasks, followed by an explanation. import math import sentry_sdk from celery import signals from sentry_sdk import monitor from sentry_sdk.integrations.celery import CeleryIntegration @signals.beat_init.connect # if you use beats @signals.celeryd_init.connect def init_sentry(**kwargs): sentry_sdk.init( dsn=..., integrations=[ CeleryIntegration(monitor_beat_tasks=False) ] ) @signals.worker_shutdown.connect @signals.task_postrun.connect def flush_sentry(**kwargs): sentry_sdk.flush(timeout=5) def add_periodic_task(celery, schedule, task): max_runtime = math.ceil(schedule * 4 / 60) monitor_config = { "recovery_threshold": 1, "failure_issue_threshold": 10, "checkin_margin": max_runtime, "max_runtime": max_runtime, "schedule": { "type": "interval", "value": math.ceil(schedule / 60.0) "unit": "minute" } } name = task.__name__ task = monitor(monitor_slug=name, monitor_config=monitor_config)(task) celery.add_periodic_task(schedule, celery.task(task).s(), name=name)
Python
Python
fromPythontest
2 weeks ago

Installing Python 3.14 on Mac or Windows | PythonTest

uv enables clean, convenient installation and management of multiple Python versions; python.org installers remain a simple choice for single-version users.
Python
fromTall, Snarky Canadian
2 weeks ago

Why it took 4 years to get a lock files specification

A lock file must unambiguously record where and how to obtain and install every dependency, handling source trees, sdists, wheels, specifiers, and dependency graphs.
Python
fromMicrosoft for Python Developers Blog
2 weeks ago

Python in Visual Studio Code - October 2025 Release - Microsoft for Python Developers Blog

October 2025 Python extensions for VS Code add Python Environments fixes, Copy Test ID testing workflow, and shell startup improvements for environment activation.
fromTreyhunner
2 weeks ago

Handy Python REPL Modifications

I find myself in the Python REPL a lot. I open up the REPL to play with an idea, to use Python as a calculator or quick and dirty text parsing tool, to record a screencast, to come up with a code example for an article, and (most importantly for me) to teach Python. My Python courses and workshops are based largely around writing code together to guess how something works, try it out, and repeat.
Python
Python
fromPeterbe
2 weeks 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.
fromTheregister
2 weeks ago

Python 3.14 released with cautious free-threaded support

Free threading in Python, which disables the global interpreter lock (GIL), is now a complete implementation of PEP (Python Enhancement Proposal) 703, a much anticipated feature which makes concurrent programming in Python natural. Free-threaded mode also enables a specialized adaptive interpreter, originally part of the Faster CPython project led by Mark Shannon at Microsoft (though the company axed its support in May).
Python
Python
frompythontest.com
2 weeks ago

pytest 2.6.0 release

pytest-check 2.6.0 makes check.raises() return an object with a .value property so exception values can be inspected like pytest.raises().
Python
fromBitcoin Magazine
2 weeks ago

Brazil's OranjeBTC Goes Public, Boosts LATAM Bitcoin Push

OranjeBTC listed on Brazil's B3 as a corporate vehicle centered on holding 3,675 BTC, becoming Latin America's largest corporate Bitcoin holder.
#functions
#ruff
Python
fromMathspp
2 weeks ago

TIL 134 - = alignment in string formatting

The '=' alignment puts the sign left and digits right; a leading zero width uses '=' and pads the number with zeros.
fromRealpython
3 weeks ago

Episode #268: Advice on Beginning to Learn Python - The Real Python Podcast

What's changed about learning Python over the last few years? What new techniques and updated advice should beginners have as they start their journey? This week on the show, Stephen Gruppetta and Martin Breuss return to discuss beginning to learn Python. We share techniques for finding motivation, building projects, and learning the fundamentals. We provide advice on installing Python and not obsessing over finding the perfect editor. We also examine incorporating LLMs into learning to code and practicing asking good questions.
Python
#mcp
fromRealpython
3 weeks ago
Python

Python MCP Server: Connect LLMs to Your Data Quiz - Real Python

MCP connects LLMs to external systems using prompts, resources, and tools; explains installation, tool-definition best practices, client-server setups, transports, and testing.
fromPycoders
1 month ago
Python

PyCoder's Weekly | Issue #698

Python ecosystem updates cover building durable MCP servers and remote MCP patterns, async usage trade-offs, testing stdout/stderr, REPL color customization, version history, and security releases.
Python
fromInfoWorld
3 weeks ago

PDM: A smarter way to manage Python packages

PDM recomputes dependency graphs after changes; use pdm list or pdm list --graph, pdm install or pdm sync to install; PDM doesn't mark dev/optional packages.
Python
fromPycoders
3 weeks ago

PyCoder's Weekly | Issue #702

Django adds django.tasks for abstracted background task management; Python advances include free-threaded asyncio scaling and MCP servers to connect LLMs with tools and data.
Python
fromRoseHosting
3 weeks ago

How to Install Python on Debian 13

Install Python 3.13 on Debian 13 using APT quickly, or compile newer Python versions from source for customization and the latest features.
fromPythonmorsels
3 weeks ago

Why splitlines() instead of split("\n")?

Let's say we have some text that was retrieved from a database, and the original text came from a form submission in a web browser. Web browsers often represent line breaks as a carriage return character, followed by a line feed character: That's what we see in our text as well: \r followed by \n. This is often called CRLF (carriage return and line feed) whereas \n is called LF (line feed).
Python
#ty
Python
fromInfoWorld
4 weeks ago

Python and Poetry: 4 tools for keeping Python simple

nvmath-python enables accelerated NVIDIA GPU math in Python with low-level performance knobs; The Zen of Python (import this) provides concise Python programming aphorisms.
Python
fromBeauty-of-imagination
4 weeks 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.
Python
fromThe JetBrains Blog
1 month ago

Why Is Python So Popular in 2025? | The PyCharm Blog

Python remains a widely used, versatile language in 2025, powering AI, machine learning, data workflows, and scalable production systems across developer experience levels.
Python
fromInfoWorld
1 month ago

How to manage Python projects with Poetry

Poetry is an all-in-one Python project manager providing deterministic dependencies, virtual environment handling, and simplified building, packaging, and publishing to PyPI.
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
fromRealpython
1 month ago

Strip Characters From a Python String Quiz - Real Python

Use strip, lstrip, and rstrip to remove whitespace or specified characters from string ends and choose the appropriate method for the desired trimming.
Python
fromTalkpython
1 month ago

pyx - the other side of the uv coin (announcing pyx)

Pyx is a Python-native package registry that mirrors PyPI, works with pip and uv, and enables faster, more predictable installs via smart client-server cooperation.
Python
fromRealpython
1 month ago

Strip Characters From a Python String - Real Python

Use Python's .strip(), .lstrip(), .rstrip() to remove whitespace or specified characters from string ends; use .removeprefix()/.removesuffix() for exact sequences.
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.
Python
fromThepythoncodingstack
1 month 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.
Python
fromRealpython
1 month ago

What Can You Do With Python? Quiz - Real Python

Python can be used across web development, CLIs, TUIs, GUIs, data work, and robotics, and learners can assess knowledge with an interactive quiz.
Python
fromRealpython
1 month ago

Ways to Start Interacting With Python Quiz - Real Python

Review methods to run Python interactively, including REPL, executing scripts, and working within integrated development environments (IDEs).
Python
fromPythonmorsels
1 month ago

Nested list comprehensions

Clearly formatted nested list comprehensions express list-of-lists creation more directly and readably than equivalent nested for-loops.
#type-hints
Python
fromRealpython
1 month ago

Python Project Management With uv - Real Python

uv is a Rust-written, high-speed, all-in-one Python package and project manager that handles dependencies, virtual environments, Python versions, builds, and publishing.
Python
fromPycoders
1 month ago

PyCoder's Weekly | Issue #699

Feature flags, Rust-based Python type checkers, AI agent monitoring tools, pandas .dropna guidance, and tooling updates provide practical improvements for Python development and debugging.
Python
fromMicrosoft for Python Developers Blog
1 month ago

Python in Visual Studio Code - September 2025 Release - Microsoft for Python Developers Blog

Pylance adds experimental AI hover summaries and an in-memory Run Code Snippets tool; Python and Jupyter extensions receive updates and Python Environments adds pipenv support.
Python
fromMouse Vs Python
1 month ago

Erys - A TUI for Jupyter Notebooks - Mouse Vs Python

Erys is a Python Textual-based terminal application that lets users create, edit, and run Jupyter Notebooks in the terminal using jupyter-client.
fromInfoWorld
1 month ago

Making good choices: How to get the best from Python tools

The way to get the best from Python, aka "the lingua franca of AI," is by knowing both its traps and its treasures.
Python
Python
fromRealpython
1 month ago

Episode #265: Python App Hosting Choices & Documenting Python's History - The Real Python Podcast

Choose platform-as-a-service for simplicity and automation, containers for portability and consistency, and virtual machines for full control and isolation.
fromTheregister
1 month ago

AI-powered penetration tool downloaded 10K times

Villager, a new penetration-testing tool linked to a suspicious China-based company and described by researchers as "Cobalt Strike's AI successor," has been downloaded about 10,000 times since its release in July. The package, published on Python Package Index, operates as a Model Context Protocol (MCP) client and integrates multiple security tools. It includes Kali Linux, which legitimate defenders use to automate penetration testing, and it contains hundreds of tools that can also be used to launch cyber attacks at scale.
Python
Python
fromWingware
1 month ago

Wing Python IDE Version 11.0.4 - September 8, 2025 - Wing Python IDE

Wing 11.0.4 adds Python 3.14 debugger and analysis support, improves code analysis and warnings, and expands AI-assisted development with broader provider and context support.
fromRealpython
1 month ago

Sorting Dictionaries in Python: Keys, Values, and More Quiz - Real Python

This quiz helps you practice sorting dictionaries by keys, values, and custom rules in modern Python. You'll revisit how insertion order works, when to use different views, and how to rebuild sorted dictionaries. You'll also learn best practices for sorting dictionaries efficiently. For a complete overview, check out Sorting Dictionaries: Keys, Values, and More. The quiz contains 11 questions and there is no time limit. You'll get 1 point for each correct answer.
Python
Python
fromRealpython
1 month ago

Python String Splitting - Real Python

Use Python's .split() to divide strings by whitespace or custom delimiters and control the number of splits with maxsplit; use re.split for regex patterns.
Python
fromInfoWorld
1 month ago

How to spin Python's challenges into AI gold

Standardize Python tools, workflows, and a 'golden path' to eliminate ecosystem friction and accelerate reliable AI and data project delivery.
Python
fromTechBeamers
1 month ago

Python Memory Tricks to Boost Performance

Use Python 3.13's mimalloc and memory-aware coding techniques to reduce memory usage and prevent MemoryError and leaks.
Python
fromPythonmorsels
1 month ago

The power of Python's print function

Python's print function accepts multiple positional arguments, can unpack iterables, handles automatic string conversion, and offers flexible separators—often replacing join for printing.
Python
fromPythonmorsels
1 month ago

The power of Python's print function

Python's print function accepts multiple arguments, unpacks iterables with *, and automatically converts objects to strings, providing flexible alternatives to join and f-strings.
[ Load more ]