Metadata-Version: 2.4
Name: eai-configgy
Version: 0.3.0
Summary: Opinionated YAML + environment configuration loader for Extensibility AI services
Author: Extensibility AI
License: Apache-2.0
Project-URL: Homepage, https://github.com/ExtensibilityAI/eai-configgy
Project-URL: Repository, https://github.com/ExtensibilityAI/eai-configgy
Project-URL: Issues, https://github.com/ExtensibilityAI/eai-configgy/issues
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: envyaml>=1.10.211231
Requires-Dist: pydantic>=2.13.4
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Provides-Extra: publish
Requires-Dist: twine>=5; extra == "publish"
Requires-Dist: keyring>=24; extra == "publish"
Requires-Dist: keyrings.google-artifactregistry-auth>=0.0.3; extra == "publish"
Dynamic: license-file

# eai-configgy

Opinionated YAML + environment configuration loader for Extensibility AI services.

Load a committed `config.yaml` with [EnvYAML](https://github.com/thesimj/envyaml) interpolation, then select the block for `CONFIG_ENV` (`default`, `staging`, or `prod`).

## Install

```bash
uv add eai-configgy
```

Or with pip:

```bash
pip install eai-configgy
```

## Usage

```python
from eai_configgy import Config, ConfigEnv

cfg = Config(section="myapp", env=ConfigEnv.DEFAULT)
```

## Development

Use **uv** for dependency management:

```bash
uv sync --extra dev
uv run pytest
```

## Publish

Tagged releases (`v*`) publish to **public PyPI** via `.github/workflows/publish-pypi.yml` (Trusted Publishing, GitHub Environment `pypi`) and also to **Artifact Registry** via `.github/workflows/deploy.yml` for internal indexes.

Repository: [ExtensibilityAI/eai-configgy](https://github.com/ExtensibilityAI/eai-configgy)

### First public release (maintainers)

Do these after this repo’s rename PR is on `main`, **before** tagging `v0.3.0`. A pending publisher does not reserve the name until the first successful upload.

1. **Rename the GitHub repo** to `eai-configgy` (Settings → General → Repository name). Keep GitHub’s redirect. Locally: `git remote set-url origin git@github.com:ExtensibilityAI/eai-configgy.git`.
2. **Create GitHub Environment `pypi`**: required reviewers; deployment branches/tags restricted to `v*`. No secrets (OIDC). Optional: Environment `testpypi` for dry-runs.
3. **PyPI account**: register at https://pypi.org (2FA required). Prefer a PyPI organization (e.g. `extensibility-ai`) so the project is not personal-owned. Confirm https://pypi.org/project/eai-configgy/ is unused (404).
4. **Pending Trusted Publisher** (PyPI Account → Publishing, not a project page):

   | Field | Value |
   | --- | --- |
   | PyPI project name | `eai-configgy` |
   | Owner | `ExtensibilityAI` |
   | Repository | `eai-configgy` |
   | Workflow name | `publish-pypi.yml` |
   | Environment | `pypi` |

5. **GAR WIF after the GitHub rename:** set `github.repo: ExtensibilityAI/eai-configgy` in `infrastructure-core-gcp/pulumi/python_package/configgy/Pulumi.{staging,prod}.yaml`, then `pulumi up` those stacks (only with explicit approval).
6. **Tag and approve:** `git tag v0.3.0 && git push origin v0.3.0`. Approve the `pypi` environment. Confirm https://pypi.org/project/eai-configgy/0.3.0/.
7. Optional: make the GitHub repository public after LICENSE and SECURITY.md are on `main`.

