19
How is my Python code? (raw.githubusercontent.com)
submitted 14 hours ago* (last edited 14 hours ago) by the_citizen@lemmy.world to c/python@programming.dev

I don't know if it's the true place to ask, apologizing if not. I started to python one and half week ago. So I'm still beginner.

I made a terminal based weather application with python. What do you think about the code, is it good enough? I mean is it professional enough and how can I make the same functions with more less code?

Here's the main file (I also added it as url to post): https://raw.githubusercontent.com/TheCitizenOne/openweather/refs/heads/main/openweather.py
Here's the config.json file: https://raw.githubusercontent.com/TheCitizenOne/openweather/refs/heads/main/config.json

you are viewing a single comment's thread
view the rest of the comments
[-] Endmaker@ani.social 1 points 13 hours ago* (last edited 13 hours ago)

Too lazy to check the logic but if possible, consider using enums.

[-] the_citizen@lemmy.world 2 points 3 hours ago

Yes I need to use enums. I realized it now.

this post was submitted on 25 Apr 2025
19 points (95.2% liked)

Python

7044 readers
54 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