Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

HEA Scripts

Contains scripts for configuring a Health Enterprise Analytics (HEA) deployment. The primary scripts handle Fernet symmetric encryption of secrets stored in .env files.

Setup

Install the package in editable mode (the dev container does this automatically):

pip install --user -e .

Requires Python 3.10 - 3.12.

Usage

Generate an encryption key

hea-gen-encryption-key

Save the printed key in your .env file as HEA_ENCRYPTION_KEY, or in a dedicated file (recommended) referenced by HEA_ENCRYPTION_KEY_FILE. If using a file, restrict its permissions:

chmod 600 hea_encryption_key.txt

Encrypt / decrypt a value

# Encrypt a literal value
hea-encryption --encrypt <value>

# Encrypt a property already in .env (result is written to stdout with {crypt} prefix)
hea-encryption --encrypt -p <PROPERTY_NAME>

# Decrypt a token
hea-encryption --decrypt <token>

# Read input from a file
hea-encryption --encrypt -f <file>
hea-encryption --decrypt -f <file>

# Write output to a file instead of stdout
hea-encryption --encrypt <value> -o <output_file>

Configuration

Scripts expect a .env file in the working directory. The encryption key is resolved in this order:

  1. HEA_ENCRYPTION_KEY_FILE environment variable (path to key file)
  2. HEA_ENCRYPTION_KEY_FILE in .env (path to key file)
  3. HEA_ENCRYPTION_KEY environment variable (inline key)
  4. HEA_ENCRYPTION_KEY in .env (inline key)

Encrypted values stored in .env use the format:

PROPERTY={crypt}<fernet-token>

Contributing

Install the package with the dev optional dependencies to get pytest:

pip install --user -e ".[dev]"

Run the tests:

python -m pytest tests/

Deploying: Run pyproject-build to build a source package and weel.

To deploy, the twine command is configured with a custom .pypirc file located at .devcontainer/pyproject-pypirc. Add your repositories and credentials to that file, and twine upload -r should work.

Metadata

Release files for hea-scripts 1.0.0b3

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

Source distribution (sdist)

Source distribution for hea-scripts 1.0.0b3
File Size Uploaded Provenance Actions
hea_scripts-1.0.0b3.tar.gz 10.5 kB Without provenance Details for hea_scripts-1.0.0b3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hea-scripts 1.0.0b3
File Interpreter ABI Platform Actions
hea_scripts-1.0.0b3-py3-none-any.whl Python 3 none any Details for hea_scripts-1.0.0b3-py3-none-any.whl

Total release size: 19.8 kB

Release files / hea_scripts-1.0.0b3.tar.gz

Download URL hea_scripts-1.0.0b3.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6b8e773e76e4d7566f93dae49269cc18310810a9e5689c73774cd8496801638d
BLAKE2b-256 checksum
How to use checksums
60991f64d71c32e6610539743daec7f94c83091f7b2663dbb7f145c2fa590fa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / hea_scripts-1.0.0b3-py3-none-any.whl

Download URL hea_scripts-1.0.0b3-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
889c51ed24b33e808e40732905608c92b609c2b8b394b8a248125cc2449112e4
BLAKE2b-256 checksum
How to use checksums
98dc20bf1e1e34ce741b8848619fada2b3bc87bae071f0b960114e094e9988a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for hea-scripts 1.0.0b3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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