Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 55 lines (36 sloc) 1.248 kb
65072a5 @petervizi first commit
authored
1 ===========
2 python-eeml
3 ===========
4
5 :authors: peter.vizi@gmail.com
6
1be2d5b @petervizi Update README.rst
authored
7 .. image:: https://travis-ci.org/petervizi/python-eeml.png?branch=master
0f8bbca @petervizi Update README.rst
authored
8 :target: https://travis-ci.org/petervizi/python-eeml
1be2d5b @petervizi Update README.rst
authored
9
65072a5 @petervizi first commit
authored
10 Intorduction
11 ============
12
13 This is a python package for generating eeml_ documents.
14
fcb93e1 @petervizi Check URL argument for Pachube object
authored
15 Installation
16 ============
17
46bc1f5 @petervizi Proper format for install instructions
authored
18 With administrative privileges run::
96ea891 @petervizi update example and readme
authored
19
46bc1f5 @petervizi Proper format for install instructions
authored
20 sudo python setup.py install
21
22 Without root access::
23
24 python setup.py install --prefix=~/
25 PTYHONPATH="~/lib/python2.7/site-packages" python example/simple_example.py
fcb93e1 @petervizi Check URL argument for Pachube object
authored
26
33845ca @petervizi Fahrenheit support
authored
27 Example
28 =======
29
30 An example python script for publishing measurement data::
31
32 import eeml
33a842a @petervizi Updating examples with correct package names
authored
33 import eeml.datastream
34 import eeml.unit
33845ca @petervizi Fahrenheit support
authored
35 import serial
36
37 # parameters
38 API_KEY = 'YOUR PERSONAL API KEY'
39 API_URL = 'YOUR PERSONAL API URL, LIKE /api/1275.xml'
40
41 serial = serial.Serial('/dev/ttyUSB0', 9600)
42 readings = serial.readline().strip().split(' ') # the readings are separated by spaces
33a842a @petervizi Updating examples with correct package names
authored
43 pac = eeml.datastream.Cosm(API_URL, API_KEY)
44 pac.update([eeml.Data(0, readings[0], unit=eeml.unit.Celsius()), eeml.Data(1, readings[1], unit=eeml.unit.RH())])
33845ca @petervizi Fahrenheit support
authored
45 pac.put()
46
ed40100 @dazzag24 Added a new example
dazzag24 authored
47 Other examples can be found in the example folder.
48
65072a5 @petervizi first commit
authored
49 Requirements
50 ============
51
52 * python-xml
53
54 .. _eeml: http://www.eeml.org/
Something went wrong with that request. Please try again.