14
submitted 11 months ago by BoneALisa@lemm.ee to c/python@programming.dev

I have done plenty of basic scripting for work, but this is my first "real" project, and wanted to see what real python experts think of it and see if there is anything I might be doing horribly wrong lol.

Im deploying documentation automatically here: https://ogs-python.dakotamarshall.net/

And the PyPI package is here: https://pypi.org/project/ogsapi/

I am very much a beginner, and its still very much a work in progress. Let me know if there is anything that could be drastically improved!

you are viewing a single comment's thread
view the rest of the comments
[-] wesker@lemmy.sdf.org 3 points 11 months ago* (last edited 11 months ago)

After a quick skim, I might suggest looking into dataclasses. Particularly that OGSGame class might be a good candidate. They can remove a lot of necessary init boilerplate, and you'd get asdict for free.

[-] BoneALisa@lemm.ee 2 points 11 months ago

Just discovered dataclasses the other day actually, Im using it for OGSCredentials and am happy with how easy it was, so I will be converting other stuff over to it as well!

[-] thedeepself@programming.dev 0 points 11 months ago

I would opt for Traitlets over dataclasses... but both are superior to vanilla Python objects.

[-] BoneALisa@lemm.ee 1 points 11 months ago

Ill take a look at Traitlets too! Thanks!

this post was submitted on 14 Jul 2023
14 points (100.0% liked)

Python

5878 readers
20 users here now

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

📅 Events

October 2023

November 2023

PastJuly 2023

August 2023

September 2023

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

founded 1 year ago
MODERATORS