Python client for the Netrias harmonization API
Project description
Netrias Client
"""Explain how to install and exercise the Netrias harmonization client."""
Install with uv
- Install
uv:curl -LsSf https://astral.sh/uv/install.sh | sh - Create, activate, and sync virtual environment:
uv venv
source .venv/bin/activate
uv sync
"""Use the Netrias to harmonize data via the Netrias API."""
import os
from pathlib import Path
from typing import Final
from dotenv import load_dotenv
from netrias_client import NetriasClient
# Create a Netrias Client and populate it with your API key
netrias_client = NetriasClient()
netrias_client.configure(api_key={Insert API key here})
# Point to the csv file to harmonize
CSV_PATH: Final[Path] = Path("data") / "primary_diagnosis_1.csv"
# Determine the data -> CDE mapping
manifest = netrias_client.discover_cde_mapping(source_csv=CSV_PATH, target_schema="ccdi")
# Harmonize the data
result = netrias_client.harmonize(source_path=CSV_PATH, manifest=manifest)
Configuration Options
NetriasClient.configure(...) accepts additional tuning knobs. You can mix and match the ones you need:
| Parameter | Type | Purpose |
|---|---|---|
api_key |
str |
Required. Bearer token for authenticating with the Netrias services. |
confidence_threshold |
`float | None` |
timeout |
`float | None` |
log_level |
`LogLevel | str |
discovery_use_gateway_bypass |
`bool | None` |
log_directory |
`Path | str |
Configure only the options you need; unspecified values fall back to sensible defaults.
Usage Notes
discover_cde_mapping(...)samples CSV values and returns a manifest-ready payload- Call
harmonize(...)orharmonize_async(...)(async) with the manifest to download a harmonized CSV. The result object reports status, description, and the output path. - The package exposes
__version__so callers can assert the installed release. - Optional extras (
netrias_client[aws]) add boto3 helpers for the temporary gateway bypass.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netrias_client-0.0.5.tar.gz.
File metadata
- Download URL: netrias_client-0.0.5.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09ffd09ba28b8fb5feb3e91abf35da554f911c7394b73e2319c164ff1df2bd10
|
|
| MD5 |
69d3280a5a00d9ebfe63c34754fb11f5
|
|
| BLAKE2b-256 |
da99789aa89f8d49e2cf62f25ad45039586597752b66c768ca6529d5953a78e7
|
File details
Details for the file netrias_client-0.0.5-py3-none-any.whl.
File metadata
- Download URL: netrias_client-0.0.5-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
879aadeb2d8270452826b8352fb24872e7aa79d543d4b429b9077211482ae9e9
|
|
| MD5 |
38fd9498402057bd5223a26ea838e25a
|
|
| BLAKE2b-256 |
8e5fe69ee338a39e26e51ba022fcf675017352f371b4cfcdd126aaa1d12a63b3
|