File: PKG-INFO

package info (click to toggle)
xmlmarshaller 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 156 kB
  • sloc: python: 559; makefile: 5
file content (128 lines) | stat: -rw-r--r-- 4,342 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Metadata-Version: 1.1
Name: xml_marshaller
Version: 1.0.1
Summary: Converting Python objects to XML and back again.
Home-page: http://www.python.org/community/sigs/current/xml-sig/
Author: Nicolas Delaby
Author-email: nicolas@nexedi.com
License: Python License (CNRI Python License)
Description-Content-Type: UNKNOWN
Description: Introduction
        ============
        
        This module allows one to marshal simple Python data types into a
        custom XML format.  The Marshaller and Unmarshaller classes can be
        subclassed in order to implement marshalling into a different XML DTD.
        Original Authors are XML-SIG (xml-sig@python.org).
        
        Fully compatible with PyXML implementation, enables namespace support
        for XML Input/Output.
        
        Implemented with lxml
        
        Installation
        ============
        
        python setup.py install
        
        
        Testing
        =======
        
        python setup.py test
        
        Usage
        =====
        
        For simple serialisation and unserialisation::
        
        
          >>> from xml_marshaller import xml_marshaller
          >>> xml_marshaller.dumps(['item1', {'key1': 1, 'key2': u'unicode string'}])
          '<marshal><list id="i2"><string>item1</string><dictionary id="i3"><string>key1</string><int>1</int><string>key2</string><unicode>unicode string</unicode></dictionary></list></marshal>'
          >>> xml_marshaller.loads(xml_marshaller.dumps(['item1', {'key1': 1, 'key2': u'unicode string'}]))
          ['item1', {'key2': u'unicode string', 'key1': 1}]
        
        Can works with file like objects::
        
        
          >>> from xml_marshaller import xml_marshaller
          >>> from StringIO import StringIO
          >>> file_like_object = StringIO()
          >>> xml_marshaller.dump('Hello World !', file_like_object)
          >>> file_like_object.seek(0)
          >>> file_like_object.read()
          '<marshal><string>Hello World !</string></marshal>'
          >>> file_like_object.seek(0)
          >>> xml_marshaller.load(file_like_object)
          'Hello World !'
        
        xml_marshaller can also output xml with qualified names::
        
        
          >>> from xml_marshaller import xml_marshaller
          >>> xml_marshaller.dumps_ns('Hello World !')
          '<marshal:marshal xmlns:marshal="http://www.erp5.org/namespaces/marshaller"><marshal:string>Hello World !</marshal:string></marshal:marshal>'
        
        
        You can also use your own URI::
        
          >>> from xml_marshaller.xml_marshaller import Marshaller
          >>> marshaller = Marshaller(namespace_uri='http://my-custom-namespace-uri/namespace')
          >>> marshaller.dumps('Hello World !')
          '<marshal:marshal xmlns:marshal="http://my-custom-namespace-uri/namespace"><marshal:string>Hello World !</marshal:string></marshal:marshal>'
        
        
        History
        =======
        
        1.0.1 (2018-11-12)
        ------------------
        
        - Fix changelog.
        
        1.0 (2018-11-12)
        ----------------
        
        - Stop distinguish unicode and bytes and always return 'str'
        
        0.10 (2018-09-12)
        -----------------
        
        - Add support for Python 3
        
        0.9.7 (2010-10-30)
        ------------------
        
        - Enhance egg folder structure
          [nicolas Delaby]
        - Improve tests
          [nicolas Delaby]
        - add XSD Schema
          [nicolas Delaby]
        
        0.9.6 (2010-10-12)
        ------------------
        
        - [fix] Support boolean transformation
          [Nicolas Delaby]
        
        0.9.5 (2010-09-01)
        ------------------
        
        - [fix] Formatting of documentation
          [Lukasz Nowak]
        
        0.9.4 (2010-09-01)
        ------------------
        
        - [fix] Instances are now correctly unmarshalled.
          [Cedric de Saint Martin]
        
Keywords: XML marshaller
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Python License (CNRI Python License)
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing :: Markup :: XML