Python

7867 readers
1 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
1
2
1
PyPI stats 2026 (blog.piwheels.org)
submitted 3 days ago* (last edited 3 days ago) by NostraDavid@programming.dev to c/python@programming.dev
 
 

I saw that PiWheels posted their PyPI (pronounced pie-pee-eye, not pie-pie as that's the JIT interpreter) article, showing off some neato stats, like the longest PyPI package names, and such.

3
4
5
 
 

An exercise to help build the right mental model for Python data.

The “Solution” link visualizes execution and reveals what’s actually happening using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵: https://github.com/bterwijn/memory_graph

6
 
 

I followed the Python packaging guide to upload my project to TestPyPI, but the README is missing images.

I read that relative paths to images don't work because PyPI only has the scope of the README itself and (maybe) Sphinx directory? So the README on Codeberg looks normal, but on PyPI it's missing the images.

What can I do so both Codeberg and PyPI can render images?

Ideally, I would like a solution that still allows rendering the images locally after downloading the source files (if that's possible).

I thought of maintaining a clone of the README (something like README.pypi.md), but I don't think that is a good idea. Any thoughts?

7
 
 

The SafeDep blog reports that compromised versions of the telnyx package have been found in the PyPI repository:

Two versions of telnyx (4.87.1 and 4.87.2) published to PyPI on March 27, 2026 contain malicious code injected into telnyx/_client.py. The telnyx package averages over 1 million downloads per month (~30,000/day), making this a high-impact supply chain compromise. The payload downloads a second-stage binary hidden inside WAV audio files from a remote server, then either drops a persistent executable on Windows or harvests credentials on Linux/macOS.

8
9
 
 

Today we’re announcing that OpenAI will acquire Astral⁠, bringing powerful open source developer tools into our Codex ecosystem.

Astral has built some of the most widely used open source Python tools, helping developers move faster with modern tooling like uv, Ruff, and ty. These tools power millions of developer workflows and have become part of the foundation of modern Python development. As part of our developer-first philosophy, after closing OpenAI plans to support Astral’s open source products. By bringing Astral’s tooling and engineering expertise to OpenAI, we will accelerate our work on Codex and expand what AI can do across the software development lifecycle.

10
 
 

Title is kinda confusing, but basically, I followed the Python packaging process to set up my Python package development environment. My project structure is layed out the same, except for a .venv in the root directory (not in src), and additional Python files in the src/package_username directory.

I can build my package fine, but when I go to import it into other projects, I have to import it like import package_username.file or from package_username.file import SomethingInFile. For other python packages, I would only need to do import package or from package import Something.

How can I set up by build process to remove the need for the first portion in my import statements so it matches other packages like termcolor? Is there something I need to add in my __init__.py file?

11
 
 

For example:

class FooBar:
    def __init__(self):
        self.a: int = None
        self.foo: str = None

Is this bad practice/go against PEP guidelines or is it fine?

12
 
 

Django Playground is an experimental browser-based IDE that runs Django using Pyodide (Python in WebAssembly). This is a first version exploring what's possible with Django in the browser - no server required.

13
14
15
16
17
18
 
 

Links:

I created it mainly as a proof of concept that python's typing system is mature enough to support such a thing. The process was fun and I was able to help make remeda.js docs a bit better

The library is as typed as possible with my knowledge of python typing system, which means dict typing is kinda meh, but for iterables it is as good as in TS.

I decided to publish 1.X, since I've been adding a lot of stuff that "absolutely must be in 1.X" and got tired of the scope creep, so there is a bunch of TODOs, but they are "nice to have"s.

I'm planning to work on the TODOs and making the docs better now that I've managed to release it.

About the library:

It supports what remeda.js calls "data-first" and "data-last" approaches to calling functions. That means:

x = R.map([1, 2, 3], lambda i: i + 1)
# is the same as
x = R.map(lambda i: i + 1)([1, 2, 3])

which allows for a "fun" function composition:

import remedapy as R

R.pipe(
    [1, 2, 2, 3, 3, 4, 5, 6],
    R.for_each(print),
    R.unique(),
    R.take(3),
    list
)
# Returns [1, 2, 3]
# Prints:
# 1
# 2
# 2
# 3

Features:

  • as typed as possible, checked with basedpyright
  • 100% code coverage, but the tests could be a bit more exhaustive
  • docstrings for everything (they might require some work)
  • no AI, 100% Human Stupidity
19
20
 
 

I built django-vtasks to replace Celery (task queue) in my open source project, GlitchTip. I wanted something with an asyncio-first approach that supports Valkey and Postgres backends. Sync tasks run in threads. We don't support every Celery broker and feature, but I think we have a good feature set and we outperform Celery in benchmarks. Being able to run my_task.aenqueue() is friendlier than doing this in Celery from an async view. It allows for a true asyncio valkey call, not sync_to_async. I found django-tasks not performant enough, as I need high concurrency. (As I understand, Django Tasks is modeled off of that project, so thank you to django-tasks folks). If this sounds useful, give it a try. Or better yet, submit a bug report or merge request.

21
 
 

It is common knowledge that pickle is a serious security risk. And yet, vulnerabilities involving that serialisation format keep happening. In the article I shortly describe the issue and appeal to people to stop using pickle.

22
 
 

I'm a hobbyist and butcherer of python code. Quite often i'm jumping between multiple laptops / desktops playing around with different projects. Just wondering what the best workflow is or suggestions people have around syncing projects so I can edit and work on projects regardless of the computer. Is this something that people generally manage through github?? Thanks in advance for the thoughts!

23
24
1
submitted 2 months ago* (last edited 2 months ago) by cm0002@libretechni.ca to c/python@programming.dev
25
 
 

These past few years, we have seen Python become the backbone of modern AI development. Most machine learning frameworks, including TensorFlow and PyTorch, rely heavily on Python.

The language's accessible nature and extensive library ecosystem have made it the default choice for data scientists and AI researchers worldwide.

Now, the stewards of this programming language, the Python Software Foundation, have announced that Anthropic, the company behind Claude, will invest $1.5 million in the foundation over the next two years.

view more: next ›