Skip to main content

Brief

alt Latest Version alt License alt Downloads Build Status

A simple xml parse and build library.

Installation

pip install db0905

Examples

  • xml to python object
>>> import db0905
>>> xml = '<demo><foo>foo</foo><bar>bar</bar></demo>'
>>> db0905.loads(xml)
{'bar': 'bar', 'foo': 'foo'}
>>> db0905.loads(xml, strip_root=False)
{'demo': {'bar': 'bar', 'foo': 'foo'}}
>>> xml = '<demo><foo>foo</foo><bar>1</bar><bar>2</bar></demo>'
>>> db0905.loads(xml)
{'bar': ['1', '2'], 'foo': 'foo'}
  • python object to xml
>>> data = {'demo':{'bar': ['1', '2'], 'foo': '<foo>'}}
>>> db0905.dumps(data)
'<?xml version="1.0" encoding="utf-8"?><demo><foo><![CDATA[<foo>]]></foo><bar><![CDATA[1]]></bar><bar><![CDATA[2]]></bar></demo>'
>>> db0905.dumps(data, cdata=False)
'<?xml version="1.0" encoding="utf-8"?><demo><foo>&lt;foo&gt;</foo><bar>1</bar><bar>2</bar></demo>'
>>> print db0905.dumps(data, indent=' ' * 4)
<?xml version="1.0" encoding="utf-8"?>
<demo>
   <foo><![CDATA[<foo>]]></foo>
   <bar><![CDATA[1]]></bar>
   <bar><![CDATA[2]]></bar>
</demo>

Documentation

See docs in readthedocs

Changelog

See changelog

Metadata

Release files for db0905 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for db0905 1.0.1
File Size Uploaded Provenance
db0905-1.0.1.tar.gz 11.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for db0905 1.0.1
File Interpreter ABI Platform
db0905-1.0.1-py2-none-any.whl Python 2 none any Details

Total release size: 30.5 kB

Release files / db0905-1.0.1.tar.gz

Download URL db0905-1.0.1.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b6f42269208f0c6d18458c173392a5a03f08d29272e3506a26ed4978a88a0e1e
BLAKE2b-256 checksum
How to use checksums
afed2c0de2c5d8cb5630c213915670f40789d736e9dbf5cf439ecdc818dad5c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/2.7.5

Release files / db0905-1.0.1-py2-none-any.whl

Download URL db0905-1.0.1-py2-none-any.whl
Size 19.2 kB
Tags Python 2
SHA-256 checksum
How to use checksums
827a2219a43b0e22ae5daf456151887e49c87dc3ac0a84ab3bee9b5f4d328a6c
BLAKE2b-256 checksum
How to use checksums
a84a5886b3af815dbb3b63d8a5caebb5b3370fd53e660e25c7e8382cb02e308e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/2.7.5

Security for db0905 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page