Python implementation of the Common Information Model.
PyCIM is a Python implementation of the IEC Common Information Model.
Current features include:
- Support for IEC 61970 15v13 and IEC 61968 11v05,
- Legacy support for IEC 61970 14v15 and IEC 61968 10v31,
- Profiles of the CIM, including: - Common Power Systems Model (CPSM) (CIM v14) - Common Distribution Power System Model (CDPSM) (CIM v14 and v15) - European Network of Transmission System Operators for Electricity (ENTSO-E) (CIM v14),
- Class and attribute documentation integrated as Python doc-strings,
- Transparent bi-directional reference handling using Python properties,
- CIM RDF/XML parsing and serialisation according to IEC 61970-552.
$ easy_install PyCIM
Alternatively, download and unpack the tarball and install:
$ tar zxf PyCIM-XX.XX.tar.gz $ python setup.py install
On UNIX systems, use sudo for the latter command if you need to install the scripts to a directory that requires root privileges:
$ sudo python setup.py install
$ git clone https://github.com/rwl/PyCIM.git
To parse a CIM RDF/XML file:
In: import logging In: logging.basicConfig(level=logging.INFO) In: from PyCIM import cimread In: d = cimread('path/to/input_file.xml') INFO:PyCIM.RDFXMLReader:Created 5660 CIM objects in 1.04s.
The cimread function returns a Python dictionary that maps UUIDs to CIM objects. To serialise the dictionary of objects:
In: from PyCIM import cimwrite In: cimwrite(d, 'path/to/output_file.xml') INFO:PyCIM.RDFXMLWriter:5660 CIM objects serialised in 1.14s.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
PyCIM is developed by Richard Lincoln (email@example.com).
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|PyCIM-15.15.0-py2.py3-none-any.whl (3.0 MB) Copy SHA256 hash SHA256||Wheel||py2.py3|
|PyCIM-15.15.0.tar.gz (1.8 MB) Copy SHA256 hash SHA256||Source||None|