Skip to main content

Python implementation of the Common Information Model.

Project description

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.

Installation

PyCIM has no dependencies beyond Python 2.5 or later. It can be easy_installed using setuptools:

$ 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

The development Git repository can be cloned from GitHub:

$ git clone https://github.com/rwl/PyCIM.git

Quick start

To parse a CIM RDF/XML file:

In[1]: import logging

In[2]: logging.basicConfig(level=logging.INFO)

In[3]: from PyCIM import cimread

In[4]: 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[5]: from PyCIM import cimwrite

In[6]: cimwrite(d, 'path/to/output_file.xml')
INFO:PyCIM.RDFXMLWriter:5660 CIM objects serialised in 1.14s.

For further information refer to the website and the API documentation.

License

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.

Credits

PyCIM is developed by Richard Lincoln (r.w.lincoln@gmail.com).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyCIM-15.13.4.tar.gz (1.8 MB view details)

Uploaded Source

Built Distributions

PyCIM-15.13.4.win32.exe (3.1 MB view details)

Uploaded Source

PyCIM-15.13.4-py2.7.egg (5.4 MB view details)

Uploaded Source

PyCIM-15.13.4-py2.6.egg (5.4 MB view details)

Uploaded Source

PyCIM-15.13.4-py2.5.egg (5.4 MB view details)

Uploaded Source

File details

Details for the file PyCIM-15.13.4.tar.gz.

File metadata

  • Download URL: PyCIM-15.13.4.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyCIM-15.13.4.tar.gz
Algorithm Hash digest
SHA256 93b9147b1dcb1f8918bfb6bc7bce5504b76be435a21ae44eac3b274558141147
MD5 1b03e0a23ce7294293b12018546a8dfa
BLAKE2b-256 1614d14a2b1579d66dd411eebe206573300b51753796c32fade0c3608792bcb3

See more details on using hashes here.

File details

Details for the file PyCIM-15.13.4.win32.exe.

File metadata

  • Download URL: PyCIM-15.13.4.win32.exe
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyCIM-15.13.4.win32.exe
Algorithm Hash digest
SHA256 87c2d140522c8d877e4c3e9b182cd8b5de5115c336c6282ed4cf3da0c4e950ac
MD5 9b9a4a3f6d62e4c4a7f239196323cec7
BLAKE2b-256 3e4e3a50537e560f782ec7206e37930af10f1d634609809e840c9b0ef83d150c

See more details on using hashes here.

File details

Details for the file PyCIM-15.13.4-py2.7.egg.

File metadata

  • Download URL: PyCIM-15.13.4-py2.7.egg
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyCIM-15.13.4-py2.7.egg
Algorithm Hash digest
SHA256 d393a9f116ef636fb20c61568584b4fa1a859df24328b0833b9f435484a4a0b5
MD5 3b3011397e7b3a594ae2334e88c67811
BLAKE2b-256 fe714d914ed707449f042b787bb642c93ba31b0ca9bbbf534199e6ecf4c0513a

See more details on using hashes here.

File details

Details for the file PyCIM-15.13.4-py2.6.egg.

File metadata

  • Download URL: PyCIM-15.13.4-py2.6.egg
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyCIM-15.13.4-py2.6.egg
Algorithm Hash digest
SHA256 f280025a3df0f9329a59769d9fa1c3cd8241bed48e3a47532ae2d7b3fdccff62
MD5 905ff1f6b85c1424d61d45d25a0937bb
BLAKE2b-256 b7fdef09b356f586cbd66906e9e2204fc26aef235636b7be6e3f3646048f48fb

See more details on using hashes here.

File details

Details for the file PyCIM-15.13.4-py2.5.egg.

File metadata

  • Download URL: PyCIM-15.13.4-py2.5.egg
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyCIM-15.13.4-py2.5.egg
Algorithm Hash digest
SHA256 d128cf07df713e542b394b02987bf3f49d3f1a8fd735228de2d259c1bb1a004b
MD5 9cb9f075944b5743bf868f9f3750e990
BLAKE2b-256 7ee1994d49c5741a0913d89806234df2de833b2c19431d9df1ecfb70a96d4f9a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page