Skip to main content
https://github.com/seed-platform/py-seed/actions/workflows/ci.yml/badge.svg?branch=develop https://badge.fury.io/py/py-seed.svg

py-SEED serves as a Python client for the SEED Platform API. This library is purpose-built for Python applications, enabling interaction with the SEED Platform API to access property lists, create properties, establish connections, and retrieve data from ENERGY STAR(R) Portfolio Manager, BETTER, and other sources. The SEED Platform has a robust API, granting users access to every front-end feature seamlessly via the API. Currently, this library exposes the most commonly used SEED API endpoints and will undergo continuous updates tailored to the community’s evolving needs. py-SEED offers two interaction levels: a high-level API providing familiar endpoints for easy connectivity to SEED’s API, and a low-level API that allows read-write access to any SEED API, demanding a deeper understanding of the SEED API architecture

py-SEED is compatible with the latest version of the SEED Platform (>2.17.4) and only support SEED API Version 3.

More information can be found here:

Compatibility Matrix

py-SEED Version

SEED Version

0.5.0 - current

3.1.0

0.4.3

2.21.0 - 3.0.0

Stakeholders

The following list of stakeholders should be considered when making changes to this module

  • 179D Tax Deduction Web Application

  • Earth Advantage Green Building Registry

  • User scripts for managing building data

  • ECAM

Documentation

The SEED client is a read-write client. To install the client run:

pip install py-seed

Within Python you can use the client like this:

from pathlib import Path
from pyseed.seed_client import SeedClient

# The seed-config.json file defines the hosting location and credentials for your SEED instance.
# If running SEED locally for testing, then you can run the following from your SEED root directory:
#    ./manage.py create_test_user_json --username user@seed-platform.org --host http://localhost:8000 --file ./seed-config.json --pyseed

config_file = Path('seed-config.json')
organization_id = 1
seed_client = SeedClient(organization_id, connection_config_filepath=config_file)

# Get/create the new cycle and upload the data. Make sure to set the cycle ID so that the
# data end up in the correct cycle
cycle = seed_client.get_or_create_cycle(
    'pyseed-api-test', date(2021, 6, 1), date(2022, 6, 1), set_cycle_id=True
)

seed_client.upload_and_match_datafile(
    'pyseed-properties-test',
    'tests/data/test-seed-data.xlsx',
    'Single Step Column Mappings',
    'tests/data/test-seed-data-mappings.csv'
)

# See the projects unit tests for more examples. https://github.com/SEED-platform/py-seed/blob/develop/tests/test_seed_client.py
# Or look at the py-SEED examples repository: https://github.com/SEED-platform/pyseed-examples

Low-Level Documentation

This client has access to the lower level API client by accessing seed_client_base.SEEDOAuthReadOnlyClient, seed_client_base.SEEDOAuthReadWriteClient, seed_client_base.SEEDReadOnlyClient, and seed_client_base.SEEDReadWriteClient. This provides two user authentication based Python clients and two authentication methods, basic and OAuth2. More information on authentication can be seen in the following py-SEED classes:

SEEDOAuthReadOnlyClient
SEEDOAuthReadWriteClient
SEEDReadOnlyClient
SEEDReadWriteClient

Note the clients do not provide per api-call methods, but does provide the standard CRUD methods: get, list, put, post, patch, delete. The intended use of these clients is to be further subclassed or wrapped in functions to provide the desired functionality. The CRUD methods are provided via mixins so its possible to create a client for example without the ability to delete by subclassing SEEDUserAuthBaseClient, or SEEDOAuthBaseClient, and adding only the mixins that provided the Create, Read and Update capabilities. Basic usage for the provided low-level clients is as follows:

from pyseed import SEEDReadWriteClient

seed_client = SEEDReadWriteClient(
    your_org_id,
    username=your_username,
    password=your_password,
    base_url=url_of_your_seed_host,
    )

# list all properties
seed_client.list(endpoint='properties')

# get a single property
seed_client.get(property_pk, endpoint='properties')

Testing

Tests can be run via the pytest command.

You will need to export environment variables for a test portfolio manager account to test integration. Environment variables should be named:

SEED_PM_UN
SEED_PM_PW

SEED Platform

SEED (Standard Energy Efficiency Data Platform™) is an open source “web-based application that helps organizations easily manage data on the energy performance of large groups of buildings” funded by the United States Department of Energy.

License

Full details in LICENSE file.

Releasing

This project is configured with GitHub Actions to automatically release to PyPi when a new tag is created. To release a new version:

  • Create a branch with the prepared release change log.

  • Update README’s Compatibility matrix, CHANGELOG, and the version in pypoetry.toml.

  • Merge branch to develop.

  • To release, from the command line merge latest develop into latest main: git merge --ff-only origin develop. This will point the HEAD of main to latest develop. Then push the main branch to GitHub with git push, which may require a developer with elevated privileges to push to main.

  • Back in GitHub create a new tag in GitHub against main and copy the change log notes into the tag description.

  • GitHub Actions will automatically prepare the release the new version to PyPi.

  • Go to GitHub actions to approve the release.

The GitHub Action required updates to the GitHub repo to only release on tags (https://github.com/SEED-platform/py-seed/settings/environments) after approval and on PyPi to add an authorized publisher (https://pypi.org/manage/project/py-SEED/settings/publishing/).

Metadata

Release files for py-SEED 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-SEED 0.5.2
File Size Uploaded
py_seed-0.5.2.tar.gz 44.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-SEED 0.5.2
File Interpreter ABI Platform
py_seed-0.5.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 93.1 kB

Release files / py_seed-0.5.2.tar.gz

Download URL py_seed-0.5.2.tar.gz
Size 44.4 kB
Tags Source
SHA-256 checksum
How to use checksums
edf601c7161d91d1bbaed839e9b8905de67be1daaead5d1dad92cdff6b7be231
BLAKE2b-256 checksum
How to use checksums
dd0feb832e5f181bafb95bbcaa0f04bdb163d866250f87f5145cd630f08982d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / py_seed-0.5.2-py2.py3-none-any.whl

Download URL py_seed-0.5.2-py2.py3-none-any.whl
Size 48.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b3e2230d563b2b7b1a02d43b239cb01c4f65aa8fdbde2b4b32b061b63a1cebe9
BLAKE2b-256 checksum
How to use checksums
5d58c80cb791ae2e8155bf8ea93bbb44c9816a28a6e2eb0d85ec743fc9bb0bc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page