<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

[](LICENSE)
# pyegeria: a python client for Egeria
This is a package for easily using the Egeria
open metadata environment from python. Details about the
open source Egeria project can be found at [Egeria Project](https://egeria-project.org).
This package is in active development. There is initial
support for many of Egeria's services including configuration and operation. This client depends on
This release supports Egeria 5.1 - although most of the functions may work on earlier versions of Egeria as well.
The code is organized to mimic the existing Egeria Java Client structure.
The commands folder holds the Egeria Command Line Interface and corresponding commands
to visualize and use Egeria. The commands also serve as useful examples.
An examples folder holds some useful examples showing different facets of using pyegeria.
WARNING: files that start with "X" are in-progress placeholders that are not meant to be used..they will mature and
evolve.
All feedback is welcome. Please engage via our [community](http://egeria-project.org/guides/community/),
team calls, or via github issues in this repo. If interested in contributing,
you can engage via the community or directly reach out to
[dan.wolfson\@pdr-associates.com](mailto:dan.wolfson@pdr-associates.com?subject=pyegeria).
This is a learning experience.
## Configuration
pyegeria uses a simple, predictable precedence for configuration:
1. Built-in defaults (Pydantic models in pyegeria.config)
2. Config file (JSON) if found
3. Environment variables (OS env and optional .env)
4. Explicit env file passed to get_app_config/load_app_config
Environment always overrides config file, which overrides defaults.
### Where to put your configuration
- Config file: A JSON file named config.json. The loader looks in this order:
- If PYEGERIA_CONFIG_DIRECTORY is set: $PYEGERIA_CONFIG_DIRECTORY/$PYEGERIA_CONFIG_FILE
- Else if PYEGERIA_ROOT_PATH is set: $PYEGERIA_ROOT_PATH/$PYEGERIA_CONFIG_FILE
- Else: ./config.json (the current working directory)
- .env file: Optional. If present in the current working directory (.env), variables from it will be loaded. You can also pass a specific env file path to get_app_config(env_file=...) or load_app_config(env_file=...). For sample variables, see config/env in this repo.
### Common environment variables
- PYEGERIA_CONFIG_DIRECTORY: directory containing your config.json
- PYEGERIA_ROOT_PATH: root folder used to resolve config.json when CONFIG_DIRECTORY is not set
- PYEGERIA_CONFIG_FILE: filename of the configuration JSON (default: config.json)
- PYEGERIA_CONSOLE_WIDTH: integer console width (e.g., 200 or 280)
- EGERIA_PLATFORM_URL, EGERIA_VIEW_SERVER_URL, EGERIA_ENGINE_HOST_URL: URLs for your Egeria servers
- EGERIA_USER, EGERIA_USER_PASSWORD: credentials used by some clients
- Logging related: PYEGERIA_ENABLE_LOGGING, PYEGERIA_LOG_DIRECTORY, PYEGERIA_CONSOLE_LOG_LVL, PYEGERIA_FILE_LOG_LVL, etc.
See config/env for more variables and defaults.
### Example .env
# PYEGERIA_CONFIG_DIRECTORY=/path/to/configs
# PYEGERIA_ROOT_PATH=/path/to/project
# PYEGERIA_CONFIG_FILE=config.json
# EGERIA_PLATFORM_URL=https://localhost:9443
# EGERIA_VIEW_SERVER=qs-view-server
# EGERIA_VIEW_SERVER_URL=https://localhost:9443
# EGERIA_USER=myuser
# EGERIA_USER_PASSWORD=mypassword
# PYEGERIA_CONSOLE_WIDTH=280
Lines starting with # are comments. Quotes are optional; python-dotenv/pydantic-settings handle both.
### Example config.json (minimal)
{
"Environment": {
"Pyegeria Root": ".",
"Egeria Platform URL": "https://localhost:9443"
},
"User Profile": {
"Egeria Home Collection": "MyHome"
}
}
### Programmatic usage
from pyegeria import get_app_config
cfg = get_app_config() # uses OS env and ./.env
# or with explicit env file
cfg = get_app_config(env_file="/path/to/dev.env")
# Access values via Pydantic models
print(cfg.Environment.egeria_platform_url)
print(cfg.Logging.enable_logging)
### CLI quick checks
- Validate your env file:
python scripts/validate_env.py --env config/env
python scripts/validate_env.py # auto-detects ./config/env or ./.env
- Run tests (requires Poetry):
poetry install
poetry run pytest -v
### Troubleshooting
- If your env doesn’t seem to apply, confirm which config.json is used (the loader checks PYEGERIA_CONFIG_DIRECTORY first, then PYEGERIA_ROOT_PATH, then ./config.json).
- .env files are optional. Missing .env is not an error.
- You can always override values with OS environment variables (they take precedence over config.json).
----
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Copyright Contributors to the ODPi Egeria project.
Raw data
{
"_id": null,
"home_page": "https://github.com/odpi/egeria-python",
"name": "pyegeria",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>3.12",
"maintainer_email": null,
"keywords": "egeria, metadata, governance",
"author": "Dan Wolfson",
"author_email": "dan.wolfson@pdr-associates.com",
"download_url": "https://files.pythonhosted.org/packages/31/f5/66c7a7a386b958efc4b0fc08c7f0b0ece6a43886a5500309bdf95c1df51c/pyegeria-5.4.4.4.tar.gz",
"platform": null,
"description": "<!-- SPDX-License-Identifier: CC-BY-4.0 -->\n<!-- Copyright Contributors to the ODPi Egeria project. -->\n\n\n\n[](LICENSE)\n\n\n# pyegeria: a python client for Egeria\n\nThis is a package for easily using the Egeria\nopen metadata environment from python. Details about the\nopen source Egeria project can be found at [Egeria Project](https://egeria-project.org).\n\nThis package is in active development. There is initial\nsupport for many of Egeria's services including configuration and operation. This client depends on \nThis release supports Egeria 5.1 - although most of the functions may work on earlier versions of Egeria as well. \n\nThe code is organized to mimic the existing Egeria Java Client structure.\n\nThe commands folder holds the Egeria Command Line Interface and corresponding commands\nto visualize and use Egeria. The commands also serve as useful examples.\n\nAn examples folder holds some useful examples showing different facets of using pyegeria.\n\nWARNING: files that start with \"X\" are in-progress placeholders that are not meant to be used..they will mature and \nevolve.\n\nAll feedback is welcome. Please engage via our [community](http://egeria-project.org/guides/community/), \nteam calls, or via github issues in this repo. If interested in contributing,\nyou can engage via the community or directly reach out to\n[dan.wolfson\\@pdr-associates.com](mailto:dan.wolfson@pdr-associates.com?subject=pyegeria).\n\nThis is a learning experience.\n\n## Configuration\n\npyegeria uses a simple, predictable precedence for configuration:\n\n1. Built-in defaults (Pydantic models in pyegeria.config)\n2. Config file (JSON) if found\n3. Environment variables (OS env and optional .env)\n4. Explicit env file passed to get_app_config/load_app_config\n\nEnvironment always overrides config file, which overrides defaults.\n\n### Where to put your configuration\n\n- Config file: A JSON file named config.json. The loader looks in this order:\n - If PYEGERIA_CONFIG_DIRECTORY is set: $PYEGERIA_CONFIG_DIRECTORY/$PYEGERIA_CONFIG_FILE\n - Else if PYEGERIA_ROOT_PATH is set: $PYEGERIA_ROOT_PATH/$PYEGERIA_CONFIG_FILE\n - Else: ./config.json (the current working directory)\n\n- .env file: Optional. If present in the current working directory (.env), variables from it will be loaded. You can also pass a specific env file path to get_app_config(env_file=...) or load_app_config(env_file=...). For sample variables, see config/env in this repo.\n\n### Common environment variables\n\n- PYEGERIA_CONFIG_DIRECTORY: directory containing your config.json\n- PYEGERIA_ROOT_PATH: root folder used to resolve config.json when CONFIG_DIRECTORY is not set\n- PYEGERIA_CONFIG_FILE: filename of the configuration JSON (default: config.json)\n- PYEGERIA_CONSOLE_WIDTH: integer console width (e.g., 200 or 280)\n- EGERIA_PLATFORM_URL, EGERIA_VIEW_SERVER_URL, EGERIA_ENGINE_HOST_URL: URLs for your Egeria servers\n- EGERIA_USER, EGERIA_USER_PASSWORD: credentials used by some clients\n- Logging related: PYEGERIA_ENABLE_LOGGING, PYEGERIA_LOG_DIRECTORY, PYEGERIA_CONSOLE_LOG_LVL, PYEGERIA_FILE_LOG_LVL, etc.\n\nSee config/env for more variables and defaults.\n\n### Example .env\n\n# PYEGERIA_CONFIG_DIRECTORY=/path/to/configs\n# PYEGERIA_ROOT_PATH=/path/to/project\n# PYEGERIA_CONFIG_FILE=config.json\n# EGERIA_PLATFORM_URL=https://localhost:9443\n# EGERIA_VIEW_SERVER=qs-view-server\n# EGERIA_VIEW_SERVER_URL=https://localhost:9443\n# EGERIA_USER=myuser\n# EGERIA_USER_PASSWORD=mypassword\n# PYEGERIA_CONSOLE_WIDTH=280\n\nLines starting with # are comments. Quotes are optional; python-dotenv/pydantic-settings handle both.\n\n### Example config.json (minimal)\n\n{\n \"Environment\": {\n \"Pyegeria Root\": \".\",\n \"Egeria Platform URL\": \"https://localhost:9443\"\n },\n \"User Profile\": {\n \"Egeria Home Collection\": \"MyHome\"\n }\n}\n\n### Programmatic usage\n\nfrom pyegeria import get_app_config\ncfg = get_app_config() # uses OS env and ./.env\n# or with explicit env file\ncfg = get_app_config(env_file=\"/path/to/dev.env\")\n\n# Access values via Pydantic models\nprint(cfg.Environment.egeria_platform_url)\nprint(cfg.Logging.enable_logging)\n\n### CLI quick checks\n\n- Validate your env file:\n python scripts/validate_env.py --env config/env\n python scripts/validate_env.py # auto-detects ./config/env or ./.env\n\n- Run tests (requires Poetry):\n poetry install\n poetry run pytest -v\n\n### Troubleshooting\n\n- If your env doesn\u2019t seem to apply, confirm which config.json is used (the loader checks PYEGERIA_CONFIG_DIRECTORY first, then PYEGERIA_ROOT_PATH, then ./config.json).\n- .env files are optional. Missing .env is not an error.\n- You can always override values with OS environment variables (they take precedence over config.json).\n\n\n\n----\nLicense: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),\nCopyright Contributors to the ODPi Egeria project.",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "A python client for Egeria",
"version": "5.4.4.4",
"project_urls": {
"Homepage": "https://github.com/odpi/egeria-python",
"Repository": "https://github.com/odpi/egeria-python"
},
"split_keywords": [
"egeria",
" metadata",
" governance"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4f6676469d2eaaa5a3d03c25819f5e11b612a95e0a468ebeba8bcfe517f5e5c0",
"md5": "8d57300b75c7e553a16b9b0f54daa438",
"sha256": "c7b4a8eae59c7eaed51cee1b5cce6250540020eec89597feb31eae1ee39e5025"
},
"downloads": -1,
"filename": "pyegeria-5.4.4.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8d57300b75c7e553a16b9b0f54daa438",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>3.12",
"size": 71241381,
"upload_time": "2025-09-15T17:17:28",
"upload_time_iso_8601": "2025-09-15T17:17:28.116922Z",
"url": "https://files.pythonhosted.org/packages/4f/66/76469d2eaaa5a3d03c25819f5e11b612a95e0a468ebeba8bcfe517f5e5c0/pyegeria-5.4.4.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "31f566c7a7a386b958efc4b0fc08c7f0b0ece6a43886a5500309bdf95c1df51c",
"md5": "0da038eaf12c088d64e37d5d5a9782f8",
"sha256": "a3b6d1f824ab0cb67e18e0b7dc26993720a20b516ea36a2fe745026c05d7110f"
},
"downloads": -1,
"filename": "pyegeria-5.4.4.4.tar.gz",
"has_sig": false,
"md5_digest": "0da038eaf12c088d64e37d5d5a9782f8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>3.12",
"size": 64798659,
"upload_time": "2025-09-15T17:17:58",
"upload_time_iso_8601": "2025-09-15T17:17:58.319186Z",
"url": "https://files.pythonhosted.org/packages/31/f5/66c7a7a386b958efc4b0fc08c7f0b0ece6a43886a5500309bdf95c1df51c/pyegeria-5.4.4.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-15 17:17:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "odpi",
"github_project": "egeria-python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyegeria"
}