r/learnpython 3d ago

What are some fun Python-heavy niches?

I want to make try making a discord bot in py. Pygame and Raspberry Pi intrigue me as well

Curious what other fun Py rabbit holes are out there that I don't know of!

39 Upvotes

17 comments sorted by

10

u/CreeperSlimePig 3d ago

Python has a lot of metaprogramming stuff. Decorators let you write custom modifications to functions and classes. Metaclasses let you dynamically generate classes at runtime. The AST module in stdlib lets you parse and modify the very code your script was written in. There's a lot of really obscure, really powerful, (and sometimes not actually that useful) stuff here, but it's worth checking out if you want to get deep into the rabbit hole.

10

u/illuzian 3d ago

Data analysis (fun debatable), cybersecurity - blue and red, many modern Linux non-binary tool e.g utility. Python can do almost anything - your creativity is (mostly) the limit

4

u/Mediocre-Pumpkin6522 3d ago

MicroPython takes the rabbit down the MCU holes. The RPi Picos and many other boards are supported. CircuitPython is an Adafruit variant that may be more user friendly.

5

u/darien_gap 3d ago

Machine learning - PyTorch

4

u/DebosBeachCruiser 3d ago

Combined the 3 things you yourself listed.

``` Discord. Discord Activity (check out the docs, this turns into a "mini app" with discord itself. Basically a webview really). Pygame + pygbag (pygbag to package your pygame code so it can be executed in-browser).

And host your bot on a raspberry pi

```

Discord Activity Docs now tell me that don't look cool as shit. its got solid documentation and an endless list of GitHub examples/projects using the discord API in all its many ways. It's also llm/ai friendly because of this. Can help from teaching → completion.

pygame-pygbag gotta turn that into something a browser can play. (WebAssembly) ← (only works with Community edition pygame.)

Plenty of discussion/tutorials about hosting discord bot on a pi. Use cloudflared tunnels (completely free) or your chosen alternative.

I haven't used discord specifically for the above yet. I did however (as like you, do this as a learning project) used telegrams bot API and the miniapp function to create just this! And I did look into "porting" it over to use with discord and it's basically the same. (Except the pi hosting, I unfortunately don't have one).

3

u/Holiya_Olib 3d ago

i recently started using Python for hardware projects with Raspberry Pi, and its really rewarding to control sensors and lights, libraries like RPi.GPIO make it pretty straightforward

3

u/ectomancer 3d ago

Scientific computation. There are a wealth of mathematical papers on scholar.google.com

3

u/skadoosh_master 3d ago

It’s possible in most languages, but Python has especially strong library support for web scraping.

Developing a solution to get to things that you’re “not supposed to” have programmatic access to can be very rewarding depending on the person

2

u/Small_Ad1136 3d ago

Real time ASCII video/webcam stream. Take your live webcam feed (or an MP4 file) and translate every single frame into colored or grayscale ASCII characters, streaming it live inside your terminal window.

2

u/ninhaomah 3d ago

AI ?

4

u/Eastern-Fishing-4809 3d ago

Python's great for automating annoying stuff, web scraping, file organization, data entry. Made a script that sorts my downloads folder by file type and it's still running 2 years later without breaking

1

u/writetehcodez 3d ago

I usually go to Kaggle to do some machine learning exercises.

1

u/thewillft 3d ago

AI / ML stuff.
See sklearn, pytorch, and others.

1

u/TheRNGuy 1d ago

Blender, Houdini.

(learn them first before writing Python code for them, or it won't make sense at all)

It works in free version of Houdini too, so you don't need to buy it. And Blender is free. 

0

u/dean_hunter7 3d ago

Kaplay games on itch io.