5 PyCIM is a Python implementation of the IEC Common Information Model.
7 Current features include:
9 - Support for IEC 61970 15v13 and IEC 61968 11v05,
10 - Legacy support for IEC 61970 14v15 and IEC 61968 10v31,
11 - Profiles of the CIM, including:
12 - Common Power Systems Model (CPSM) (CIM v14)
13 - Common Distribution Power System Model (CDPSM) (CIM v14 and v15)
14 - European Network of Transmission System Operators for Electricity
16 - Class and attribute documentation integrated as Python doc-strings,
17 - Transparent bi-directional reference handling using Python properties,
18 - CIM RDF/XML parsing and serialisation according to IEC 61970-552.
23 PyCIM has no dependencies beyond Python_ 2.5 or later. It can be easy_installed
28 Alternatively, download and unpack the tarball and install::
30 $ tar zxf PyCIM-XX.XX.tar.gz
31 $ python setup.py install
33 On UNIX systems, use sudo for the latter command if you need to install the
34 scripts to a directory that requires root privileges::
36 $ sudo python setup.py install
38 The development Git_ repository can be cloned from GitHub_::
40 $ git clone https://github.com/rwl/PyCIM.git
45 To parse a CIM RDF/XML file::
49 In[2]: logging.basicConfig(level=logging.INFO)
51 In[3]: from PyCIM import cimread
53 In[4]: d = cimread('path/to/input_file.xml')
54 INFO:PyCIM.RDFXMLReader:Created 5660 CIM objects in 1.04s.
56 The ``cimread`` function returns a Python dictionary that maps UUIDs to CIM
57 objects. To serialise the dictionary of objects::
59 In[5]: from PyCIM import cimwrite
61 In[6]: cimwrite(d, 'path/to/output_file.xml')
62 INFO:PyCIM.RDFXMLWriter:5660 CIM objects serialised in 1.14s.
64 For further information refer to the website_ and the `API documentation`_.
69 Permission is hereby granted, free of charge, to any person obtaining a copy
70 of this software and associated documentation files (the "Software"), to
71 deal in the Software without restriction, including without limitation the
72 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
73 sell copies of the Software, and to permit persons to whom the Software is
74 furnished to do so, subject to the following conditions:
76 The above copyright notice and this permission notice shall be included in
77 all copies or substantial portions of the Software.
79 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
80 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
81 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
82 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
83 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
84 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
90 PyCIM is developed by Richard Lincoln (r.w.lincoln@gmail.com).
92 .. _Python: http://www.python.org/
93 .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools/
94 .. _Git: http://git-scm.com/
95 .. _GitHub: http://github.com/
96 .. _iPython: http://ipython.scipy.org
97 .. _`website`: http://www.pycim.com/
98 .. _`API documentation`: http://packages.python.org/PyCIM