Why should I care to use YAML with Django?

32 views
Skip to first unread message

Joshua Ellis

unread,
Aug 16, 2015, 12:11:36 AM8/16/15
to Django users
What purpose does it have? What kind of problem am I bound to solve in using it?

James Schneider

unread,
Aug 16, 2015, 2:44:53 AM8/16/15
to django...@googlegroups.com

Probably for the same reasons you might use XML, CSV, or JSON; data exchange and serialization between systems. YAML is just another standardized way to encapsulate data structures so that they can be passed between systems or statically archived consistently.

You could also not care at all if you have no data requirements on other systems that use YAML.

Without more context, though, there isn't really a proper way to answer your question.

-James

On Aug 15, 2015 9:10 PM, "Joshua Ellis" <soni...@gmail.com> wrote:
What purpose does it have? What kind of problem am I bound to solve in using it?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3fc97528-4f61-42b4-91c0-ef6f02e2e800%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bill Freeman

unread,
Aug 17, 2015, 10:29:07 AM8/17/15
to django-users
One interesting feature of YAML is the ability to have custom operators.  For example, with YAML used as a fixture, you might have an operator that turns a hex string into a MongoDB ObjectId on read, or a date string into a datetime object, meaning that you don't have to post process the data read.  Other serializers can obviously be extended as well, but it seems to have been well provided for in YAML (at least in  PyYAML).

Reply all
Reply to author
Forward
0 new messages