skip to navigation
skip to content

Not Logged In

nkit4py 0.1.0rc7

Simple and fast XML to Python object or JSON converter and filter. Written in C++ using Expat SAX parser.

Latest Version: 2.3.0

Introduction

nkit4py - is a nkit C++ library port to Python (see https://github.com/eye3/nkit.git). There is the same port to Node.js - nkit4nodejs (see https://github.com/eye3/nkit4nodejs.git)

Currently, only an XML to Python object or list converter and filter is exported to Python from nkit library.

You can:

  • create Python data structures, which are different from the structure of XML source.
  • explicitly identify those elements and attributes in XML source that you want to use for building Python data structures. Thus, it’s possible to filter out unnecessary XML-data.
  • explicitly define Python type of scalar data, fetched from XML source. Integers, numbers, strings, datetimes and booleans are supported.

Conversion is carried out using SAX parser Expat, so it’s fast and uses less memory when parsing huge XML files.

Module supports not only native Expat XML encodings, but also many others (see /deps/nkit/src/vx/encodings_inc_gen.cpp)

Installation

On Linux & Mac OS

pip install nkit4py

On Windows

Library compiles on MSVS Express version >= 2012. For MSVS 2012:

SET VS90COMNTOOLS=%VS110COMNTOOLS%

pip install nkit4py

For MSVS 2013:

SET VS90COMNTOOLS=%VS120COMNTOOLS%

pip install nkit4py

For new pedantic version of pip (>= v1.4)

If ‘pip install nkit4py’ doesn’t work and prints error like

“Could not find a version that satisfies the requirement nkit4py…”

then you probably have ‘pip’ version >= v1.4. In such case use:

pip install –pre nkit4py

Author

Boris T. Darchiev (boris.darchiev@gmail.com)

On github: https://github.com/eye3

 
File Type Py Version Uploaded on Size
nkit4py-0.1.0rc7.tar.gz (md5) Source 2014-08-29 243KB
nkit4py-0.1.0rc7.zip (md5) Source 2014-08-29 319KB
  • Downloads (All Versions):
  • 5 downloads in the last day
  • 898 downloads in the last week
  • 3912 downloads in the last month
  • Author: Boris T. Darchiev
  • Home Page: https://github.com/eye3/nkit4py
  • Keywords: xml2py xml2json xml python object list json fast expat sax nkit nkit4py nkit4nodejs
  • License: Apache-2.0 <http://www.apache.org/licenses/LICENSE-2.0>
  • Package Index Owner: eye3
  • DOAP record: nkit4py-0.1.0rc7.xml