Metadata-Version: 2.2
Name: dcsv
Version: 1.1.0
Summary: Module for parsing and writing DCMI structured value strings
Author-email: Erkka Rinne <erkka.rinne@fmi.fi>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: develop
Requires-Dist: pylint; extra == "develop"
Requires-Dist: black; extra == "develop"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"

# DCSV

Python module for serializing structured data to and from the Dublin Core 
Metadata Initiative DCSV format (Cox & Iannella, 2006).

## Installation

    $ pip install dscv


## Usage

    >>> import dcsv

    >>> dcsv.dumps({'foo': 2, 'bar': 3})
    'foo=2; bar=3'

    >>> dcsv.loads('pi=3.14')
    {'pi': 3.14}


List of dictionaries are also supported using special hierarchical keys:

    >>> dcsv.dumps([{'foo': 'bar'}, {'foo': 'baz'}])
    '#1.foo=bar; #2.foo=baz'

    >>> dcsv.loads('#1.foo=bar; #2.foo=baz')
    [{'foo': 'bar'}, {'foo': 'baz'}]


## References

Cox, S. and Iannella, R. (2006) DCMI DCSV. 
Available at: https://www.dublincore.org/specifications/dublin-core/dcmi-dcsv/.
