VOOZH about

URL: https://pypi.org/project/untangle/

โ‡ฑ untangle ยท PyPI


Skip to main content

untangle 1.2.1

pip install untangle

Latest release

Released:

Converts XML to Python objects

Navigation

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for Christian.tefnescu from gravatar.com
Christian.tefnescu

Unverified details

These details have not been verified by PyPI
Meta

Project description

untangle

๐Ÿ‘ Build Status
๐Ÿ‘ PyPi version
๐Ÿ‘ Code style: black

Documentation

  • Converts XML to a Python object.
  • Siblings with similar names are grouped into a list.
  • Children can be accessed with parent.child, attributes with element['attribute'].
  • You can call the parse() method with a filename, an URL or an XML string.
  • Substitutes -, . and : with _ <foobar><foo-bar/></foobar> can be accessed with foobar.foo_bar, <foo.bar.baz/> can be accessed with foo_bar_baz and <foo:bar><foo:baz/></foo:bar> can be accessed with foo_bar.foo_baz
  • Works with Python 3.7 - 3.10

Installation

With pip:

pip install untangle

With conda:

conda install -c conda-forge untangle

Conda feedstock maintained by @htenkanen. Issues and questions about conda-forge packaging / installation can be done here.

Usage

(See and run examples.py or this blog post: Read XML painlessly for more info)

import untangle
obj = untangle.parse(resource)

resource can be:

  • a URL
  • a filename
  • an XML string

Running the above code and passing this XML:

<?xml version="1.0"?>
<root>
<childname="child1"/>
</root>

allows it to be navigated from the untangled object like this:

obj.root.child['name'] # u'child1'

Changelog

see CHANGELOG.md

Project details

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for Christian.tefnescu from gravatar.com
Christian.tefnescu

Unverified details

These details have not been verified by PyPI
Meta

Download files

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

Source Distribution

untangle-1.2.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

Filter files by name, interpreter, ABI, and platform.

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

Copy a direct link to the current filters

untangle-1.2.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file untangle-1.2.1.tar.gz.

File metadata

  • Download URL: untangle-1.2.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for untangle-1.2.1.tar.gz
Algorithm Hash digest
SHA256 ae76522472722b31b303d5100c3c6f8b7dd4952b7b6c9d31e6d7b4a56f1a6d30
MD5 60b402a34d2d854ee8f7e3b39f7875b4
BLAKE2b-256 a1694fbd17bc16143343c022d845fd0fc2fc3bd89f85a5dce897cf00ad2c0e70

See more details on using hashes here.

File details

Details for the file untangle-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: untangle-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for untangle-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e783bb75996daf46ff7239ba049ee0eb54c056e235ac34809d74ea9e9898dd1
MD5 b67fc1c895e85e26933f71b98c6ba6fd
BLAKE2b-256 c74a7f7857e04d5499af7c20b82b6bae13cb4ca7543aabcef06b4069a09462d9

See more details on using hashes here.

Supported by

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