Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BreakingBytes/pvfree
Free PV API
https://github.com/BreakingBytes/pvfree
api python solar-energy
Last synced: 3 months ago
JSON representation
Free PV API
- Host: GitHub
- URL: https://github.com/BreakingBytes/pvfree
- Owner: BreakingBytes
- License: bsd-2-clause
- Created: 2015-02-28T08:09:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T06:15:45.000Z (8 months ago)
- Last Synced: 2024-06-11T17:39:13.809Z (5 months ago)
- Topics: api, python, solar-energy
- Language: Python
- Homepage: https://pvfree.azurewebsites.net/
- Size: 205 KB
- Stars: 18
- Watchers: 10
- Forks: 4
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- open-sustainable-technology - PV Free - A public API for PV modeling parameters. (Renewable Energy / Photovoltaics and Solar Energy)
README
[![travis](https://travis-ci.org/BreakingBytes/pvfree.svg?branch=master)](https://travis-ci.org/BreakingBytes/pvfree)
PV Free
=======
A public API for PV modeling parameters and pvlib API for learning about solar.Announcements
-------------
pvfree is moving to Microsoft Azure Cloud b/c Heroku free dyno service will end
Nov 28th. Please use https://pvfree.azurewebsites.net/ from now on to get module
and inverter parameters for pvlib and to learn about solar energy modeling.Usage
-----
Browsing to
[`pvfree.azurewebsites.net/api/v1/pvinverter/`](https://pvfree.azurewebsites.net/api/v1/pvinverter/?format=json)
will display a JSON string with the first 20 records. The endpoint and query
string to obtain the next set
[`api/pvinverter/?limit=20&offset=20`](https://pvfree.azurewebsites.net/api/v1/pvinverter/?format=json&limit=20&offset=20)
is contained in the `next` key of the string as are the endpoints for each
inverter. Note: the query string `?format=json` is only necessary when using the API url directly in a browser to display the response.[Tastypie](https://django-tastypie.readthedocs.org/en/latest/)
--------------------------------------------------------------
The API is generated by the Tastypie django extension. Add the following endpoints to the base URL, [`https://pvfree.azurewebsites.net/`](https://pvfree.azurewebsites.net/):* Get first 20 pvinverters.
api/pvinverter/
* Get first pvinverter.
api/pvinverter/1/
* Get pvinverter set containing #'s 2, 3, 5, and 10.
api/pvinverter/set/2;3;5;10/
* Get 100 pvinverters starting from pvinverter # 500.
api/pvinverter/?limit=100&offset=500
* Get pvinverter database schema.
api/pvinverter/schema/
[Python Requests](https://requests.readthedocs.io/en/master/)
-------------------------------------------------------------
Python has several libraries for interacting with URLs. The Requests package is available from [PyPI](https://pypi.python.org/pypi/requests).```python
>>> import requests
>>> response = requests.get('https://pvfree.azurewebsites.net/api/v1/pvinverter/set/1;3;5/')
>>> response
>>> response.status_code
200
>>> response.content
{"objects": [{"C0": -2.48104842861e-05, "C1": -9.0149429405099999e-05, "C2": 0.00066889632690700005, "C3": -0.018880466688599998, "Idcmax": 10.0, "MPPT_hi": 50.0, "MPPT_low": 20.0, "Paco": 250.0, "Pdco": 259.52205054799998, "Pnt": 0.02, "Pso": 1.7716142241299999, "Sandia_ID": 1399, "Tamb_low": -40.0, "Tamb_max": 85.0, "Vaco": 208.0, "Vdcmax": 65.0, "Vdco": 40.242603174599999, "id": 1, "manufacturer": "ABB", "name": "MICRO-0.25-I-OUTD-US-208", "numberMPPTChannels": 1, "resource_uri": "/api/v1/pvinverter/1/", "source": "CEC", "vintage": "2014-01-01", "weight": 1.6499999999999999}, ...]}
```