Skip to main content

Module for parsing and writing DCMI structured value strings

Project description

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/.

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

dcsv-1.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcsv-1.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file dcsv-1.1.0.tar.gz.

File metadata

  • Download URL: dcsv-1.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for dcsv-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fd57171c5bf0f07c35a0cf9706406ada179758834cda77cac0271a2975ada45e
MD5 831f3d3a019ef01d689f2554b6e66022
BLAKE2b-256 79216ec62da009b73559793c3148781e2460ba01846051ac8a0f46fbabe25bbb

See more details on using hashes here.

File details

Details for the file dcsv-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: dcsv-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for dcsv-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a59bce3e7b9680b0ed0dd3cba957d82462fb1083fce640b2ce425b0e4e67a02
MD5 53293098ce1042b564a1590064b855fe
BLAKE2b-256 fa83be972a5ca42be122d816018df62a5ba451e313532a525f2ab8501c5bd1df

See more details on using hashes here.

Supported by

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