The CSV module in the Python standard library has solved the issues
mentioned in this thread vis a vis format. No need to reinvent the wheel.
There are options and flags for field names and delimiters. Before relying
on a third party depencency, one must demonstrate the necessity. What edge
cases does CSV not account for and why is it our responsibility to solve
for them?

Serializing/deserializing from a CSV to a Model is trivial if the Models
are already written. We need to figure out how to handle arrays/sets for
normalized databases with foreign keys. For example in one of my projects,
an Invoice has a Vendor (many to one) Perhaps a flag for which attributes
to fetch for the reverse set and which set (list, dictionary, etc.) to
return them as?

I'd love to jump on this and come up with a RFC or something. I have a huge
amount of business logic related to (de)serialization in my app.

On Sat, Nov 28, 2020, 10:05 AM Muskan Vaswan <muskanvas...@gmail.com> wrote:

> Alright Mariusz, (sorry for messing up your name) then I think that puts
> an end to this particular conversation, I appreciate your feedback and
> help, same goes for everyone. I'll try to make myself useful in some other
> way then!
>
> On Saturday, 28 November 2020 at 14:12:29 UTC+5:30 Mariusz Felisiak wrote:
>
>> Russ pointed out the need for a standardized format in csv files, and in
>>> turn Adam suggested that the first line begin the table name. I have a
>>> slightly different suggestion. It is a well known convention to put the
>>> column names as comma separated values in the first line of the csv file. I
>>> suggest we leave it at that.
>>>
>>> *-1*
>> I wouldn't call in a convention. I've imported thousands of CSV files in
>> dozens of different formats in my life. The lack of a standard is still a
>> strong argument against including it in Django. It's not something that we
>> want to maintain in Django. It sounds like a third-party package with a
>> custom serializer is the best way to proceed.
>>
>> Best,
>> Mariusz
>> *not Markzus ;)*
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/151f28cc-dd85-47f1-ad28-5f99aeea7539n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/151f28cc-dd85-47f1-ad28-5f99aeea7539n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAK1R69rjc%2BG8pp3smP6EUbqEu-_AJXrKm2_ZMsO3if3KDLzTcA%40mail.gmail.com.

Reply via email to