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