pyedxl - a python library for handling EDXL

I am proud to announce my latest work called pyedxl which is a python library for handling OASIS Emergency Data Exchange Language (EDXL) Distribution Element. At this time, it partially supports most of specification version 1.0 published on March 14, 2006. The main purpose to develop this library is to learn how to use lxml effectively. For those who can't stand to read, you might directly go to the Subversion repository.

Currently, there is not official release yet. I recommend all you to try the latest code in the repository. Below is the checkout command.

svn checkout pyedxl

I also includes an example how to use it in tests/ directory. Please don't expect too much. There is only one example by now. In summary, the example is named that will convert fetched data from GDACS in RSS format to EDXL and print out the latest entry.


You may specify an e-mail as a command line argument to indicate sender ID.


In addition, you may specify the second argument as a local file or URL to override default RSS URL.

wget -O gdacs.xml
PYTHONPATH=. tests/ gdacs.xml

See below for generated EDXL.

<EDXLDistribution xmlns="urn:oasis:names:tc:emergency:EDXL:DE:1.0">
  <combinedConfidentiality>UNCLASSIFIED AND NOT SENSITIVE</combinedConfidentiality>
      <item xmlns="" xmlns:gdas="" xmlns:asgard="" xmlns:dc="" xmlns:geo="" xmlns:glide="">
        <title>Orange volcano alert: Galeras (Colombia) is Erupting</title>
        <description>On Thursday, December 14, 2006, an activity change occurred in the volcano Galeras in Colombia. The volcano is Erupting with SWVRC alert level 3. Since this volcano is located in a region in which live about 1.5 million people in a 100 km area, the GDACS alert level is Orange.</description>
        <pubDate>Thu, 14 Dec 2006 13:24 GMT+1</pubDate>
        <asgard:alertLevel>Alert Level 3</asgard:alertLevel>
        <asgard:date>Thu, 14 Dec 2006 13:24 GMT+1</asgard:date>
        <asgard:runDate>Thu, 14 Dec 2006 13:24 GMT+1</asgard:runDate>
        <glide:number id="" iso3="COL" year="" type="VO" number="000193">VO-2005-000193-COL</glide:number>

Hopefully this work is useful for anyone who want to develop softwares related to EDXL and its friend. In fact, Python has many XML implementation and lxml is one of them. They are able to parse any XML and generate them back to string again. However, it is not easy to know which elements must be added where in the XML tree.

Note that this is just a result of learning lxml, please don't expect performance and scalability from the current code.

Tags: , , , , ,

Post new comment

The content of this field is kept private and will not be shown publicly.