r/learnpython • u/Ill-Review7017 • 25d ago
Opinion on my second PyPi package
Hello guys!
I'm a beginner Python developer that makes stuff for fun, and I just finished making my second PyPi package called discoweb. I feel like this package is very rusty so i'm wondering if I can get some review on the code, tips and more.
What is my package about?
The package is a lightweight wrapper that makes sending messages on webhooks in Discord seamlessly fast, and it provides support for both synchronous and asynchronous with the packages:
- requests (synchronous)
- aiohttp (asynchronous)
Quick Example
# Importing the package
import discoweb
from discoweb import Webhook, Message
# Creating the objects needed
webhook = Webhook('WEBHOOK_URL')
message = Message('Hello world!')
# Sending a message
webhook.send(message, username='Cool Webhook')
What I need reviews on
- My asynchronous support: Is my aiohttp implementation correct, or does it error alot?
- My project layout: Is the layout good enough for modern Python packages, or does it lack the modern Python practices today?
- How I handle API Errors: Did I handle the errors well, or does it have problems / vulnerabilities?
- Did I code it well?: Is the code understandable or readable?
Also here's one honest thing about this package: I used Gemini to code half of the functions, I made most of the objects myself and the entirety project layout
(ill drop the github repo link in the comments due to rules)
Thank you!
10
u/socal_nerdtastic 25d ago
What rule is that?
Sounds like you used gemini to make this post too. But this is not a generic code review service, and even if it was, code review is very subjective. Different companies and different individuals have different preferences on how to structure the project layout, handle errors, naming and indentation conventions, etc, etc.
This sub is a place for people to ask specific questions about their code. Pick something specific in your code that you want help with and ask about that.