xmlwitch offers Pythonic XML generation through context generators
Project description
xmlwitch offers Pythonic XML generation through context generators in a minimalist implementation with less than 100 lines of code. BSD-licensed.
Usage
import xmlwitch xml = xmlwitch.Builder(version='1.0', encoding='utf-8') with xml.feed(xmlns='http://www.w3.org/2005/Atom'): xml.title('Example Feed') xml.updated('2003-12-13T18:30:02Z') with xml.author: xml.name('John Doe') xml.id('urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6') with xml.entry: xml.title('Atom-Powered Robots Run Amok') xml.id('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a') xml.updated('2003-12-13T18:30:02Z') xml.summary('Some text.') print(xml)
Setup
$ pip install xmlwitch # or $ easy_install xmlwitch # or $ cd xmlwitch-0.3; python setup.py install
Links
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
xmlwitch-0.3.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file xmlwitch-0.3.tar.gz
.
File metadata
- Download URL: xmlwitch-0.3.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5368319dfca28051abf78b41c0d9a6d99014389890a29ae539a0316e3f9760e |
|
MD5 | ff21ab42c57437aa1696c553f3593ab0 |
|
BLAKE2b-256 | 0ad402632fba90c3883d86d1f6c28db5fca5707498619d8e9efc9b98a377063c |
File details
Details for the file xmlwitch-0.3-py2-none-any.whl
.
File metadata
- Download URL: xmlwitch-0.3-py2-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e264c1f8cd21c810df573c27cc14bd4c8b101e0c2b316870383c8e797dd6ff4 |
|
MD5 | d6fae9e3feccd358e8dc28804be9015b |
|
BLAKE2b-256 | cc1b2469af41280a71aa4699cbe16c672a10a79a13ac8329391d9f12b16f96ba |