Skip to main content

Parse Green Button XML files into Python objects.

Project description

Green Button Objects

This Python code parses an Energy Service Provider Interface (ESPI), or "Green Button", XML file into Python objects.

Run parse_feed() from the parse.py file to get a list of UsagePoint objects. From there you should be able to explore all of the data in the feed. Documentation is a little lacking at the moment, but the class members mostly match the names from the ESPI standard (or at least the XML entities).

There's a bit of documentation in the doc directory about the ESPI standard, mostly figured out from public sources and actual ESPI files.

Forked from the original repository greenbutton-objects and packaged to be published on PyPI.

Used by the Code for Boston Home Energy Analysis Tool.

Development

Simple steps for development setup:

  1. Clone the git repository.
  2. Navigate to any directory and create a virtual environment and activate it
  3. The following commands can be run from inside the top-level greenbutton_objects folder while the virtual environment is active
  4. pip install -e . builds the python egg for greenbutton_objects and then installs greenbutton_objects
  5. pip install -r requirements-dev.txt which installs the libraries required to develop greenbutton_objects

Then, you should be able to run pytest, also from any directory, and see the test run successfully.

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

greenbutton_objects-2024.7.11.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

greenbutton_objects-2024.7.11-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file greenbutton_objects-2024.7.11.tar.gz.

File metadata

File hashes

Hashes for greenbutton_objects-2024.7.11.tar.gz
Algorithm Hash digest
SHA256 2c57221d8f9dd0c85059d7e787f841b8166deb214dbaec423025185acc68f5c2
MD5 a5e597799f9579d52ded86244185f801
BLAKE2b-256 98996c4603cd1482fbe07f9856bd798b5d2fbd838fa4d322c1f5167c47579c72

See more details on using hashes here.

File details

Details for the file greenbutton_objects-2024.7.11-py3-none-any.whl.

File metadata

File hashes

Hashes for greenbutton_objects-2024.7.11-py3-none-any.whl
Algorithm Hash digest
SHA256 7efe28572b3461899bd15880622cbb0b8b7e12fd71c22e7db2c620e37893e79f
MD5 99a0a0e118a18fdfc550b6d2874c94a2
BLAKE2b-256 6260c91f79e68f542f39cd6e1b64a5ffef9f5b4e3e340d59276c1ac221def6c9

See more details on using hashes here.

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