Skip to main content

Energyworx Sharable Packages

Energyworx customer sharable packages are published in Google Artifact Registry. This includes:

This page includes the installation instructions on how customers can download and install the corresponding packages.

1. Prerequisites

  • Python 3.13
  • gcloud CLI
  • Access to Artifact Registry project ewx-global

2. Authenticate with gcloud

gcloud auth application-default login

3. Installation with pip

mkdir my_ewx_tools
cd my_ewx_tools
python3.13 -m venv .venv
source .venv/bin/activate

pip install --upgrade pip
pip install keyring keyrings-google-artifactregistry-auth

pip install \
--index-url https://europe-west1-python.pkg.dev/ewx-global/python-shared/simple/ \
--extra-index-url https://pypi.org/simple/ \
ewx-cli==26.2.0 pytest-bdd-ewx==26.2.0

4. Installation with Poetry

If you install through Poetry and use a private source, authenticate Poetry first:

export POETRY_HTTP_BASIC_EWX_GLOBAL_USERNAME=oauth2accesstoken
export POETRY_HTTP_BASIC_EWX_GLOBAL_PASSWORD="$(gcloud auth print-access-token)"
poetry install

Note: the access token expires. Re-run the POETRY_HTTP_BASIC_EWX_GLOBAL_PASSWORD export when needed.

5. Example of complete installation with pyproject.toml (Poetry)

Use this as a starting point in a new project:

[project]
name = "my-ewx-tests"
version = "0.1.0"
description = "Example setup for Energyworx test tooling."
requires-python = ">=3.13,<3.14"
dependencies = [
"pytest>=8.4.2,<9.0.0",
"pytest-bdd>=8.1.0,<9.0.0",
"ewx-cli==26.2.0",
"pytest-bdd-ewx==26.2.0",
]

[tool.poetry]
package-mode = false

[tool.poetry.dependencies]
ewx-cli = { version = "26.2.0", source = "ewx-global" }
pytest-bdd-ewx = { version = "26.2.0", source = "ewx-global" }

[[tool.poetry.source]]
name = "ewx-global"
url = "https://europe-west1-python.pkg.dev/ewx-global/python-shared/simple/"
priority = "explicit"

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

Then run:

gcloud auth application-default login
export POETRY_HTTP_BASIC_EWX_GLOBAL_USERNAME=oauth2accesstoken
export POETRY_HTTP_BASIC_EWX_GLOBAL_PASSWORD="$(gcloud auth print-access-token)"
poetry env use python3.13
poetry install

6. Installation Issues

Common issues and fixes:

  1. Authorization error to Artifact Registry:
    • Re-run gcloud auth application-default login.
    • For Poetry, refresh token export variables.
  2. ...doesn't match any versions:
    • Usually indicates auth/source configuration is missing for private packages.
  3. Plugin not loaded in pytest:
    • Confirm pytest-bdd-ewx is installed in the active environment.

If issues persist, contact support with:

  • full command
  • full error output
  • Python version
  • package manager (pip or poetry)