It has image loading / blitting on screen, etc, input, etc, and you can do a lot with it, but it will be all pretty manual. Which can be a lot of fun. But it's not a "framework" like django is a web-framework. It doesn't give you any higher abstractions at all (sprites, animations, objects, maps / levels, etc...)
I like it, for teaching my son to code, having fun hacking easy oldschool 2d games in it.
Another more "modern" alternative might be https://love2d.org/ - I've played with it a few years ago briefly, and may well look at it again some day. It certainly seems to have a more active community than pygame - but is `lua` not `python`.
Neither have the greatest distribution / mobile story in the world, there are... options... worth checking that stuff before choosing a system to build in if that's important to you.
I dont use Javascript much, but Phaser is a joy to use and I wish we had something like that in Python. There is Arcade, but they keep breaking the code.
Godot-- I liked for simple cases and games, but it became very hard for complex projects (Ive heard the same complaint about Unity)
I remember using it to interface with a game pad (xbox controller) too. The first two things I wrote in python were complete by small games (e.g. tetris clone with accurate rules, and an entry for Ludum Dare) and it had everything I needed.
I've also used the Twisted Matrix[1] for some online TCP-based game server work, and that was pretty positive, though the library is quite daunting to figure out. That was 8 years ago though, perhaps there are better libraries nowadays.
Writing an entire game in Python might be an uphill struggle though. The interpreter is really slow, so a JIT alternative like Pypy[2] is very necessary. On my game server project I remember having to use a combination of Pypy and writing the tightest inner-most parts of my simulation loop in Cython to get the server tick to the target. As much as I love Python, if you're comfortable with Godot, it's probably a better long term investment with fewer headaches along the way.
[0] - https://pypi.org/project/PySDL2/
[1] - https://twistedmatrix.com/trac/
[2] - https://www.pypy.org/
I already have SDL2 installed via homebrew on my M1 mac. It literally took 10 seconds to clone the PySDL2 repo, `pip install .` and run the helloworld.py example that renders a test image to the screen.