Python

6288 readers
5 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 1 year ago
MODERATORS
251
 
 

In this video, we adapt a clumsy, non-Pythonic API into an easy to use, easy to understand Pythonic one. We use magic methods such as getitem_, len, enter, and _exit to make our objects a context manager and support the len() function and square bracket indexing. And in the end, we turn what once was ugly, difficult to maintain code into something that other developers would actually want to use.

252
34
Litestar 2.0 Released (blog.litestar.dev)
submitted 1 year ago* (last edited 1 year ago) by Andy to c/python
 
 

Litestar is a powerful, flexible yet opinionated ASGI framework, focused on building APIs, and offers high-performance data validation and parsing, dependency injection, first-class ORM integration, authorization primitives, and much more that's needed to get applications up and running.

https://github.com/litestar-org/litestar/


I am not personally involved in the project, I just like following its development.


I know Medium is annoying, sorry. The content is also copied on Reddit... where you can enjoy such comments as

Why would they waste their time trying to promote to the few people on Lemmy?

😢

253
 
 

I am at a high-beginner/low-intermediate level in Python, and one thing that drives me nuts is how poorly I am able to read the Python official documentation and grok how to use the described code.

What's the secret? Are there any guides/videos/books that can help my understand how to approach reading it? Or, is it just one of those things that I need to just keep coming back to while coding, and eventually I will get the hang of it?

254
255
7
pre-commit with Django (learndjango.com)
submitted 1 year ago by jnovinger to c/python
256
 
 

@beeware is doing some pretty cool stuff for #python @python
So cool to see my python program running on my #android phone.

257
 
 

Concurrency has a lot to do with sharing one resource, and Python has dedicated tools to deal with that depending on the resource you must share.

If you have to share one CPU while waiting on the network, then the specialized tools for this are asyncio, twisted, trio, gevent, etc.

Asyncio is the current standard to do this, but tornado, gevent and twisted solved this problem more than a decade ago. While trio and curio are showing us what the future could look like

But chances are, you should use none of them.

Discussion on Hacker News

258
259
 
 

Microsoft is bringing popular programming language Python to Excel. A public preview of the feature is available today, allowing Excel users to manipulate and analyze data from Python.

You won’t need to install any additional software or set up an add-on to access the functionality, as Python integration in Excel will be part of Excel’s built-in connectors and Power Query. Microsoft is also adding a new PY function that allows Python data to be exposed within the grid of an Excel spreadsheet. Through a partnership with Anaconda, an enterprise Python repository, popular Python libraries like pandas, statsmodels, and Matplotlib will be available in Excel.

260
261
262
263
264
265
 
 

One of my fav Python writeups. I love Python and luckily I get to dictate how it's being written in my job, so I'm forcing types down the through of my colleagues. Saved a bunch of debugging time, so I can waste more time on Lemmy while still getting paid. Good shit

266
267
268
 
 

Via https://fosstodon.org/@adamchainz/110887736229965200

Just released time-machine 2.12.0 with #Python 3.12 wheels, thanks to the latest cibuildwheel release from @joerick . time-machine won't be a blocker for testing Python 3.12 now 😊

https://pypi.org/project/time-machine/

269
21
How Python dictionaries work (tenthousandmeters.com)
submitted 1 year ago by jnovinger to c/python
 
 

cross-posted from: https://lemmy.sdf.org/post/2101280

Nice article reviewing hash tables and how python dictionaries are implemented with them.

270
271
 
 

cross-posted from: https://lemmy.world/post/3025539

For the last 6 months or so I’ve been working on Pinepods. I have never been able to find the perfect self-hosted podcast app that I wanted to use. podgrab’s player is rather lackluster and misses a lot of features that I would like.

With Pinepods you can play, download, and keep track of podcasts you enjoy. It allows for searching new podcasts using The Podcast Index or Itunes and provides a modern looking UI to browse through shows and episodes. In addition, Pinepods provides simple user managment and can be used by multiple users at once using a browser or app version. Everything is saved into a Mysql database including user settings, podcasts and episodes. It’s fully self-hosted, and I provide an option to use a hosted API or you can also get one from the podcast API and use your own. There’s even many different themes to choose from! Everything is fully dockerized and I provide a simple guide found below explaining how to install Pinepods on your own system.

There’s also lots of modern features like MFA, self-service password resets, and some Podcast 2.0 functionality (more to come)

In addition to all that, I’ve built a client version of the app that can connect via API to your home server over something like a reverse proxy or tailscale.

Pinepods is currently a couple beta releases in with all the basic functionality implemented. Currently, you’re likely to experience issues, but I certainly invite pull requests or opening issues if you have the time. Even assistance with debugging/creating documentation would be unbelievably helpful. You can also get setup assistance on the discord server. I invite you to try it out!

Check out the official site here:

https://www.pinepods.online/

Github here:

https://github.com/madeofpendletonwool/PinePods

Discord server:

https://discord.gg/kCHuH6UH

272
273
274
275
view more: ‹ prev next ›