Skip to main content

Support Library for MARDS data serialization

Project description

Data Serialization Based on Rolne Data Type

This is a Library of functions usefull for the interpretation of MARDS data serialization format.

This Library is dependent on the ‘rolne’ datatype class.

Usage

Simply import the library:

import MARDS

One can then convert a MARDS document into a rolne data type:

>>> my_doc = '''
>>> item zing
>>>     size 4
>>>     color red
>>>         intensity 44%
>>>     color yellow
>>> item womp
>>>     size 5
>>>     color blue
>>> item bam
>>> item broom
>>>     size 7
>>>     title "The "big" thing"
>>> zoom_flag
>>> system_title hello
>>> '''
>>> result = MARDS.string_to_rolne(my_doc)
>>> print result.get_list("items")
["zing", "womp", "bam", "broom"]

And, in reverse, one can create a MARDS document:

>>> my_doc = MARDS.rolne_to_string(result)
>>> print my_doc
x

For now, that is pretty much it. For manipulation of the rolne variable, please view the ‘rolne’ documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MARDS-0.1.0.zip (3.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page