Python Forum
General question about serialization/deserialization in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
General question about serialization/deserialization in python
#1
Hi first post!

I am currently developing an Ecommerce website and decided to try flask. I am more familiar with java but have some experience writing simpler scripts with python. However i have newer created a full application with python.

When using python for a larger project i have gotten a bit confused. If i would create the same application with java i would use objects within the program and then serialize/deserialize them when using databases and cookies etc. But this is not as straightforward with python. For example there is no simple library to use when you serialize/deserialize objects to use with a mongo database.

This makes me believe that this is not the pythonic way to do things. I could ofcourse write my own code for serialization/deserialization to dicts and other formats. But this seems to complicated since the objects is large and nested. It would be easier to just pass around dicts within the program then writing complicated serialization/deserialization logic, but this also seems wrong.

So therefore i ask you experienced pythonistas out there - What is it that i am not getting about python and serialization/deserialization?

Please note that i am not asking which library to use to convert python objects to mongo documents. I am asking for what i have not understod about python since the support for this type of serialization/deserialization is so limited.
Reply
#2
I'd start with a Flask tutorial, and get used to the way it's done in python.
A good one is: https://blog.miguelgrinberg.com/post/the...ello-world
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  python can - general question caslor 0 1,095 Jul-14-2022, 05:21 PM
Last Post: caslor
  a general question barryjo 5 1,443 Feb-01-2022, 10:12 PM
Last Post: Gribouillis
  General Programming Question with Dictionary giddyhead 12 2,590 Jan-10-2022, 10:12 AM
Last Post: Pedroski55
Big Grin General programming question (input string)[ jamie_01 2 1,569 Jan-08-2022, 12:59 AM
Last Post: BashBedlam
  Question about formula implementation in general format Alienspecimen 0 1,635 Mar-01-2021, 08:39 PM
Last Post: Alienspecimen
  General list size question to solve problem Milfredo 3 2,321 Sep-27-2020, 08:42 AM
Last Post: Milfredo
  General Listbox question. Milfredo 4 2,098 Sep-06-2020, 07:36 PM
Last Post: Milfredo
  Serialization and Deserialization between JSON obj and Python obj Yoki91 4 2,776 Jun-26-2020, 06:54 PM
Last Post: Yoki91
  General reference for Python FLAJA 1 1,583 May-22-2019, 06:41 AM
Last Post: heiner55
  General Programming Question Qui_Ten 1 2,146 Jan-14-2019, 11:15 AM
Last Post: steve_shambles

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020