Skip to main content

Python support for the Extended Environments Markup Language

Project description

Authors:

peter.vizi@gmail.com

https://travis-ci.org/petervizi/python-eeml.png?branch=master

Intorduction

This is a python package for generating eeml documents.

Installation

With administrative privileges run: sudo python setup.py install

Without root access: python setup.py install –prefix=~/ PTYHONPATH=”~/lib/python2.7/site-packages” python example/simple_example.py

Example

An example python script for publishing measurement data:

import eeml
import serial

# parameters
API_KEY = 'YOUR PERSONAL API KEY'
API_URL = 'YOUR PERSONAL API URL, LIKE /api/1275.xml'

serial = serial.Serial('/dev/ttyUSB0', 9600)
readings = serial.readline().strip().split(' ') # the readings are separated by spaces
pac = eeml.Cosm(API_URL, API_KEY)
pac.update([eeml.Data(0, readings[0], unit=eeml.Celsius()), eeml.Data(1, readings[1], unit=eeml.RH())])
pac.put()

Other examples can be found in the example folder.

Requirements

  • python-xml

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

python-eeml-4.0.0.tar.gz (19.9 kB view hashes)

Uploaded Source

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