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

Python

7271 readers
3 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 2 years ago
MODERATORS
 

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!

top 5 comments
sorted by: hot top controversial new old
[–] mvee@lemmy.ml 1 points 2 years ago* (last edited 2 years ago)

Kind of silly since python is basically source code in wheel form, but you have the package on pypi listed as gpl3 but don't provide a source repo link.

Also, I write worse code than this and get paid a lot for it :P don't sell yourself short

I would import whatever functions you want users to use often in the init script of the ogsapi module ... But idk python packages are all over the place with stuff like that, it's definitely not required.

[–] wesker@lemmy.sdf.org 0 points 2 years ago* (last edited 2 years ago) (1 children)

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 0 points 2 years ago (1 children)

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 -1 points 2 years ago

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

[–] thedeepself@programming.dev -1 points 2 years ago

oh you stored it on gitlab instead of github... quite unique.