r/Python

▲ 0 r/Python

Thoughts on a simple way to hold objects, for beginners.

I've been working on a project called Seam, and I'd love to get some feedback on the idea.

The goal of Seam is to be a data and object definition language. Think of it as something that sits somewhere between JSON and Python.

With JSON, you can store data, but it doesn't know what that data means. Your program still has to read it and manually turn it into objects.

With Python, you can directly create objects, but anyone editing those files has to know Python and can accidentally modify or execute code.

Seam aims to solve that by allowing users to define validated objects and structured data in a simple, safe format.

For example:

<Gun>
{
    Name: "AK-47"
    Damage: 35
    FireRate: 0.15
}

If the developer has already defined a Gun preset in Python, Seam automatically validates the properties and creates a real Gun object. Users don't need to know Python—they only fill in the values.

It can also be used for general structured data, similar to JSON, but with support for typed objects and validation built in.

Some goals I have:

  • Human-readable syntax
  • Strong validation and helpful errors
  • No arbitrary code execution
  • Great for configuration files, mods, plugins, game content, or applications where users define data instead of writing code
  • Initially targeting Python, with the possibility of supporting JavaScript in the future

I'm still in the early design stage, so I'd love honest feedback.

  • Does this solve a problem you've actually had?
  • Is there something existing that already does this well?
  • What features would make you consider using it?
  • What would stop you from adopting it?

So Seam is basically a project built for people who don't exactly know a lot about programming, but say they're building a project with AI and want to perhaps change some values, they can use Seam, which is readable and actually useful.

Use cases could including like game development, as mentioned earlier, but it's not just limited to that.

I'm looking for criticism just as much as encouragement, so don't hold back.

Note: This post is not for advertisement, or any showcase at all, it is simply to get your perspective whether this would be useful or not.

reddit.com
u/Any_Box624 — 7 hours ago
▲ 11 r/Python

Sunday Daily Thread: What's everyone working on this week?

Weekly Thread: What's Everyone Working On This Week? 🛠️

Hello r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!

How it Works:

  1. Show & Tell: Share your current projects, completed works, or future ideas.
  2. Discuss: Get feedback, find collaborators, or just chat about your project.
  3. Inspire: Your project might inspire someone else, just as you might get inspired here.

Guidelines:

  • Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
  • Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.

Example Shares:

  1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
  2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
  3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!

Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟

reddit.com
u/AutoModerator — 1 day ago
▲ 0 r/Python

What's one Python library you discovered this year that instantly became part of your toolkit ?

Every few months I come across a library that makes me think, "Where has this been all my life?"

Mine recently was Rich for prettier terminal output.

Curious what everyone else has found recently—could be for automation, APIs, data, web development, or just quality-of-life improvements.

reddit.com
▲ 2 r/Python

ever had a log file get corrupted from a crash mid-write?

happened to me recently, lost half a log file to a power cut. made me realize i've never actually thought about crash-safety in anything i write to disk.

how do you all handle this in your own stuff, if at all?

reddit.com
u/norashut — 1 day ago
▲ 0 r/Python

What's the most useful Python library you discovered this year?

Python's ecosystem is enormous, and every so often I come across a library that makes me wonder how I managed without it.

Recently I found a few libraries that simplified everyday tasks, and it made me realize there are probably dozens of hidden gems that don't get mentioned very often.

I'm not necessarily looking for the biggest or most popular packages like NumPy, Pandas, or Requests. I'm more interested in libraries that genuinely made your workflow easier, whether it's for automation, web development, APIs, data processing, testing, CLI tools, or just improving code quality.

What library did you discover recently that you now use regularly?

I'd love to hear what problem it solves, how you found it, and why you'd recommend it to other Python developers.

reddit.com
▲ 0 r/Python

refactor or don't touch

I have this really messy code scattered in 5 files, it s not that long abt 4000 lines.
adding a new feature started feeling like a pain,
I hate to deliver this tomorrow, and it s not meant to be scalable.
should i refactor or add the features ?

or just add the features and keep the code structure unchanged

reddit.com
u/Negative_Pay_2940 — 2 days ago
▲ 1 r/Python+1 crossposts

Hot take : AI coding assistants are Python developers cosplaying as polygots

Hot take: AI coding assistants are Python developers cosplaying as polyglots.
They’re fluent in the languages with the most training data and the loosest rules and it shows the second you hand them Go, Rust, or anything that enforces correctness at compile time.
Agree or fight me

reddit.com
u/Fabulous_rich_9103 — 3 days ago
▲ 1 r/Python+1 crossposts

I want your feedback on my game project!

Honestly I am about to finish a big game project that I didn't think that it will be huge like that so I used OOP with python to create the game so I will post again when I finish the game and I'd appreciate if anyone interested.

reddit.com
u/Mean_Tomorrow_6612 — 3 days ago
▲ 101 r/Python

When's the last time you saw Python 2 Super() syntax?

I saw one yesterday during an interview and it really confused me at first since the feature has been deprecated for so long.

Are there still code bases out there running Python 2? I used Python 3.8 at my last job and that made me feel like a dinosaur.

reddit.com
u/GongtingLover — 5 days ago
▲ 105 r/Python

Tip: use msgspec for JSON decoding — it decodes straight into your type at C speed

A tip that's saved us a lot of boilerplate across our Python stack (Litestar, and our document-extraction tooling): stop decoding JSON into dict[str, Any] and casting/.get()-ing your way through it. Decode straight into your declared type.

msgspec validates and decodes directly into your type at C speed. Quick comparison of the usual options on the same payload:

  • json.loads / orjson.loads -> dict[str, Any] (cast and pray; orjson just faster)
  • pydantic TypeAdapter(...).validate_json -> your model, validated + rich, but heavier
  • msgspec.json.decode(raw, type=T) -> your type, validated, C-fast

pydantic does far more and its Rust core is fast; for model-heavy code it's still my default. But on hot paths where you just need decode-into-a-struct, a C decoder going straight to the type is hard to beat.

With PEP 695 generics the whole (de)serialization layer collapses to one function:

def deserialize[T](raw: bytes, t: type[T]) -> T:
    return msgspec.json.decode(raw, type=t, strict=False)

deserialize(raw, Grant)        # -> Grant
deserialize(raw, list[Grant])  # -> list[Grant]

We landed on this while building Litestar (msgspec is a big reason it's fast) and reuse it across everything now. How do you handle hot-path decoding — msgspec, orjson + manual validation, or full pydantic?

reddit.com
u/Goldziher — 5 days ago
▲ 2 r/Python

Friday Daily Thread: r/Python Meta and Free-Talk Fridays

Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

How it Works:

  1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
  2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
  3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

Guidelines:

  • All topics should be related to Python or the /r/python community.
  • Be respectful and follow Reddit's Code of Conduct.

Example Topics:

  1. New Python Release: What do you think about the new features in Python 3.11?
  2. Community Events: Any Python meetups or webinars coming up?
  3. Learning Resources: Found a great Python tutorial? Share it here!
  4. Job Market: How has Python impacted your career?
  5. Hot Takes: Got a controversial Python opinion? Let's hear it!
  6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟

reddit.com
u/AutoModerator — 3 days ago
▲ 0 r/Python

Why is sending an automated email with python still a nightmare in 2026

I just spent three hours trying to get a basic python cron script to send out a weekly web scraping summary. used to just use smtplib and a random gmail app password but google basically killed that workflow

Tried installing the official python sdk for one of the big email providers and it pulled in like 6 different async dependencies just to send a plain text string. It is genuinely insane how bloated the modern python ecosystem has gotten for the most basic tasks

I ended up just writing a simple requests.post() webhook over to yaplet to handle the actual subscriber list and formatting because I absolutely refuse to fight with another bloated __init__.py or dns auth protocol this month

sometimes it really feels like we spend 10% of our time writing actual python logic and 90% fighting with enterprise api wrappers tbh

reddit.com
u/Crystallover1991 — 4 days ago
▲ 4 r/Python

Pythonista IDE for IOS should be added to the Wiki

I’ve been using the Pythonista IDE by Ole Zorn for over 10 years and I’m just amazed at how consistently good it is. It doesn’t have the latest greatest features but I still use it almost daily. Works with IOS Shortcuts as well. This would be a good one to add to the Wiki.

reddit.com
u/TutorialDoctor — 4 days ago
▲ 14 r/Python+2 crossposts

Welcome to the r/audiophile help desk. A place where you can ask community members for help shopping for and setting up stereo gear.

This thread refreshes once every 7 days so you may need to repost your question again in the next help desk post if a redditor isn't around to answer.

Finding the right guide

Before commenting, please check to see if your question actually belongs in one of these other places:

Shopping and purchase advice

To help others answer your question, consider using this format.

To help reduce the repetitive questions, here are a few of the cheapest systems we are willing to recommend for a computer desktop:

$100: Edifier R1280T Powered Bookshelf Speakers Amazon (US) / Amazon (DE)

  • Does not require a separate amplifier and does include cables.

$400: Kali LP-6 v2 Powered Studio Monitors Amazon (US) / Thomann (EU)

  • Not sold in pairs, requires additional cables and hardware, available in white/black.
  • Require a preamplifier for volume control - eg Focusrite Scarlett Solo

Setup troubleshooting and general help

Before asking a question, please check the commonly asked questions in our FAQ.

Examples of questions that are considered general help support:

  • How can I fix issue X (e.g.: buzzing / hissing) on my equipment Y?
  • Have I damaged my equipment by doing X, or will I damage my equipment if I do X?
  • Is equipment X compatible with equipment Y?
  • What's the meaning of specification X (e.g.: Output Impedance / Vrms / Sensitivity)?
  • How should I connect, set up or operate my system (hardware / software)?
u/AutoModerator — 4 days ago
▲ 34 r/Python

Mitigating "architectural drift" in large Python backend codebases using AI tools

I've been experimenting with AI agents and autocomplete platforms for a greenfield FastAPI project. In the first few weeks, it felt incredibly fast. But now that we've scaled to multiple routers, complex Pydantic schemas, and SQLAlchemy models, the structural debt is piling up.

The AI writes code that functions, but it constantly violates our architecture. It'll put complex business logic inside a route handler instead of the service layer, or it'll mess up async database sessions across modules. I find myself spending more time refactoring the structure of what it built than it would have taken to write the logic myself.

Is anyone else hitting this scaling wall where AI utility drops off as codebase complexity grows? How are you keeping your system architecture clean?

reddit.com
u/CrazyGeek7 — 5 days ago
▲ 0 r/Python

NEED PYTHON RESOURCES

Which channel has best tutorial for python. Any book recommendations. How much should be learned for AI engineer and if possible share roadmap too

reddit.com
u/Superb-Upstairs-1160 — 3 days ago