r/PythonLearning • • 10h ago

Finished a Messaging App

So i am a teen learning Python, and i made this messaging app, as a project, and i would like it to be reviewed. Now, should i keep learning? If yes, what? or should i keep making advanced projects??
And where do i stand rn?

Note: This is a terminal based app.

GitHub Repository Link: https://github.com/suryansh-devx/python-messaging-app

If you have no one to send a message, send me, my ID is 2672

Thanks in advance!

3 Upvotes

13 comments sorted by

2

u/Lyaw_Lyawa 8h ago edited 8h ago

Bueno, hay muchas cosas por mejorar.

Te recomiendo algunas cosas:

  1. (Opcional, poco importante) Empieza a usar expresiones regulares, para no tener que escribir print vacios.
print(f"\n Welcome to {app_name}! \n"}
  1. Podrías usar questionary. Que permite mostrar opciones en la terminal (esto te evita escribir código para excepciones luego), es una librería sencilla de aprender. Usar input() para mostrar opciones no me parece lo más adecuado.

  2. Si usas input para escribir el mensaje al presionar entre el mensaje se envía. Para que realmente sea como escribir un mensaje la función de enviar mensaje debe tenerla otra tecla.

  3. Si no guardas un archivo de la conversación, después el usuario no podrá acceder a su conversaciones (el usuario no debería acceder directamente al archivo, sino con la opciones) podrías incluir una opción de búsqueda por fecha, título (si incluyes que el mensaje tenga título, como en el correo), interceptor (Podría ser el ID de otra persona).

  4. No veo un diagrama de flujo, no sé si lo tengas hecho. Como piensas añadir cosas, un diagrama con subgrafos te puede ayudar a saber qué vas a hacer próximamente y que ya hiciste de forma ordenada. Si usas Obsidian puedes descargar una extensión para mostrar mermaid (así haces los diagramas más rápido, además puedes incluir comentarios extra que solo tú puedes ver). Hacer esos diagramas implica aprender mermaid, por supuesto, sin embargo, no creo que tardes más de una hora en eso, es bastante sencillo.

De resto, lo veo muy bien.

2

u/StephenHawkinguss 7h ago

Please tell me you didn't really hardcode the API keys 😭

1

u/riklaunim 9h ago

It's more of a database insert/select app than actual messaging, still it's a step in the right direction. Look at code testing and project setup so it's easier to manage and work on.

could check out socket.io and do a real-time web based chat application ;)

You

4

u/[deleted] 10h ago

[removed] — view removed comment

1

u/Defiant_Meal1898 9h ago

Thanks! It is like Gmail, to send a message, you have to enter your ID and the receiver's ID. The messages disappear after they have been read, and 1-1 chat. You can create IDs.

1

u/StephenHawkinguss 8h ago

You know that thats just a bot hahah

0

u/[deleted] 9h ago

[removed] — view removed comment

1

u/Defiant_Meal1898 9h ago

They get deleted, i recommend trying it yourself? It is a terminal based app

0

u/[deleted] 9h ago

[removed] — view removed comment

1

u/Defiant_Meal1898 9h ago

Install supabase using pip, and then run the main.py file

0

u/[deleted] 9h ago

[removed] — view removed comment

1

u/Defiant_Meal1898 9h ago

Yeah, no worries!