Skip to main content

Residential Electrification Model API

Project description

rewiringamerica-rem

An API for REM, the Residential Electrification Model. The other Rewiring America APIs and methodology for REM are here.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.1.0
  • Package version: 0.3.0
  • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

For more information, please visit https://www.rewiringamerica.org/

Requirements.

Python 3.8+

Installation & Usage

pip install

Run:

pip install rewiringamerica-rem

Then import the package:

import rewiringamerica_rem

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import rewiringamerica_rem

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import rewiringamerica_rem
from rewiringamerica_rem.models.heating_fuel_input import HeatingFuelInput
from rewiringamerica_rem.models.savings import Savings
from rewiringamerica_rem.models.supported_upgrade import SupportedUpgrade
from rewiringamerica_rem.rest import ApiException
from pprint import pprint
import os

# Defining the host is optional and defaults to https://api.rewiringamerica.org
# See configuration.py for a list of all supported configuration parameters.
configuration = rewiringamerica_rem.Configuration(
    host = "https://api.rewiringamerica.org"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: auth
configuration = rewiringamerica_rem.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with rewiringamerica_rem.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = rewiringamerica_rem.ResidentialElectrificationModelApi(api_client)
    upgrade = rewiringamerica_rem.SupportedUpgrade() # SupportedUpgrade | The upgrade whose effects we want to analyze. Supported values are as follows: - `basic_enclosure`: A basic weatherization upgrade for the home   as described in measure package 1 (on page 4) of [this   document](https://oedi-data-lake.s3.amazonaws.com/nrel-pds-building-stock/end-use-load-profiles-for-us-building-stock/2022/EUSS_ResRound1_Technical_Documentation.pdf). - `min_eff_hp_elec_backup`: A relatively-low efficiency heat pump upgrade for the home’s HVAC   system as described in measure package 3 (on page 5) of [this   document](https://oedi-data-lake.s3.amazonaws.com/nrel-pds-building-stock/end-use-load-profiles-for-us-building-stock/2022/EUSS_ResRound1_Technical_Documentation.pdf). - `high_eff_hp_elec_backup`: A high efficiency heat pump upgrade for the home’s HVAC system as   described in measure package 4 (on page 6) of [this   document](https://oedi-data-lake.s3.amazonaws.com/nrel-pds-building-stock/end-use-load-profiles-for-us-building-stock/2022/EUSS_ResRound1_Technical_Documentation.pdf). - `whole_home_electric_max_eff_basic_enclosure`: A whole-home upgrade including a high   efficiency heat pump for the home’s HVAC system, basic weatherization, a heat pump water heater, a heat pump dryer,   and an induction stove as described in measure package 9 (on page 9) of [this   document](https://oedi-data-lake.s3.amazonaws.com/nrel-pds-building-stock/end-use-load-profiles-for-us-building-stock/2022/EUSS_ResRound1_Technical_Documentation.pdf). - `med_eff_hp_hers_sizing_no_setback`: A medium-efficiency heat pump upgrade for   the home's HVAC system. Rewiring America simulated this upgrade using the same tools NREL uses for ResStock. - `med_eff_hp_hers_sizing_no_setback_basic_enclosure`: A custom upgrade based on a   medium-efficiency heat pump and basic weatherization upgrade for the home. Rewiring America simulated this upgrade   using the same tools NREL uses for ResStock. 
    address = 'address_example' # str | The address of the home being upgraded.
    heating_fuel = rewiringamerica_rem.HeatingFuelInput() # HeatingFuelInput | The heating fuel used in the home before the upgrade. Supported values are as follows: - `electricity`: the home was heated with electric heating, such as   baseboard heating, an electric boiler, or an electric furnace. - `natural_gas`: The home was heated with a natural gas furnace. - `fuel_oil`: The home was heated with a fuel oil boiler or furnace. - `propane`:  The home was heated with a propane furnace. 

    try:
        # Get By Address
        api_response = api_instance.get_by_address(upgrade, address, heating_fuel)
        print("The response of ResidentialElectrificationModelApi->get_by_address:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ResidentialElectrificationModelApi->get_by_address: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.rewiringamerica.org

Class Method HTTP request Description
BuildingProfilerApi get_home_profile GET /api/v1/building_profiler/home Get Home Profile
ResidentialElectrificationModelApi get_by_address GET /api/v1/rem/address Get By Address
ResidentialElectrificationModelApi get_by_profile POST /api/v1/rem/profile Get By Profile
ResidentialElectrificationModelApi get_impl_version GET /api/v1/rem/server_version Get Impl Version

Documentation For Models

Documentation For Authorization

Sign up for an API key here.

Authentication schemes defined for the API:

auth

  • Type: Bearer authentication

Author

datascience@rewiringamerica.org

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

rewiringamerica_rem-0.3.0.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rewiringamerica_rem-0.3.0-py3-none-any.whl (52.3 kB view details)

Uploaded Python 3

File details

Details for the file rewiringamerica_rem-0.3.0.tar.gz.

File metadata

  • Download URL: rewiringamerica_rem-0.3.0.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for rewiringamerica_rem-0.3.0.tar.gz
Algorithm Hash digest
SHA256 54dd11d3d48682880602e79b9ba173c7781656eff29faa0f22fa0a25aab17420
MD5 00a6af85b5ca2a72819e7ec377f81b2d
BLAKE2b-256 6a7ea4ed82d64606c0a7a9d54141970461bcf90006c3ff0ffb106552b216b9c2

See more details on using hashes here.

File details

Details for the file rewiringamerica_rem-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for rewiringamerica_rem-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b294379fc54e8b19269d4befc18c6bbf6330fd006808a75cd17c37d11cd7e62
MD5 5eaf413212bd392fccf0c947abee3e90
BLAKE2b-256 41ef19cafadd2076ce9babe9fc8779833d489619e8dd4a861f633e4c845b9966

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page