# Python module to open PHPFina feeds

**URL:** <https://community.openenergymonitor.org/t/python-module-to-open-phpfina-feeds/17838>\
**Category:** Integrations\
**Created:** [27 May 2021 12:18 UTC](https://community.openenergymonitor.org/t/python-module-to-open-phpfina-feeds/17838 "2021-05-27T12:18:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandrecuer](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/alexandrecuer/32/9158_2.png) [@alexandrecuer](https://community.openenergymonitor.org/u/alexandrecuer)\
**Post date:** [27 May 2021 12:18 UTC](https://community.openenergymonitor.org/t/python-module-to-open-phpfina-feeds/17838/1 "2021-05-27T12:18:22Z")

</div>

Hello

The PHPFina engine is coded in PHP.

Anyway, there is a lot of tools in python ([numpy](https://numpy.org/), [scipy](https://www.scipy.org/)) to work with feeds. It is a different approach to the one using another grapher such as grafana for example. After opening some feeds on python, you can use all the scientific tools available in python, which gives you about the power of [Matlab](https://www.mathworks.com/products/matlab.html)…and there is no need to reinvent the wheel like when coding a new process in PHP 🙂

If you don’t have an emoncms server at hand, if you want to work on old feeds coming from a deprecated emoncms installation, you can use this PyFina module to visualize your feeds

A module is available through pip to open your feeds with python as numpy feeds

`python3 -m pip install --upgrade PyFina`

or if you use windows

`py -m pip install --upgrade PyFina`

to get started, opening feed number 1 stored in the same folder, with an interval of 3600s and for 8 days :

```auto
from PyFina import getMeta, PyFina
dir = "."
meta = getMeta(1,dir)
Text = PyFina(1,dir,meta["start_time"],3600,24*8)

```

Some examples :

> **[PyFina/tests at main · Open-Building-Management/PyFina](https://github.com/Open-Building-Management/PyFina/tree/main/tests)**
>
> main/tests

if some of you are interested in testing, I am interested in feedback

Best

Alex

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [29 May 2021 12:38 UTC](https://community.openenergymonitor.org/t/python-module-to-open-phpfina-feeds/17838/2 "2021-05-29T12:38:39Z")

</div>

This is really nice, thanks for sharing @alexandrecuer

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [29 May 2021 12:53 UTC](https://community.openenergymonitor.org/t/python-module-to-open-phpfina-feeds/17838/3 "2021-05-29T12:53:46Z")

</div>

Ran the code documented in your readme and it works really well 🙂

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/6/9/692d5df07c898b599affa53e979c23771fe0436c.png)
