Metadata-Version: 2.1
Name: galileo-core
Home-page: https://www.galileo.ai/
License: Apache-2.0
Description-Content-Type: text/markdown
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pydantic
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Framework :: IPython
Classifier: Framework :: Jupyter
Classifier: Framework :: Jupyter :: JupyterLab
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: ML
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10.0
Requires-Dist: pydantic>=2.6.0,<3.0.0
Requires-Dist: pydantic-partial>=0.10.1,<1.0.0
Requires-Dist: pydantic-settings>=2.2.1,<3.0.0
Requires-Dist: pyjwt>=2.8.0,<3.0.0
Requires-Dist: httpx>=0.27.0,<0.29.0
Requires-Dist: typing-extensions>=4.12.2,<5.0.0
Requires-Dist: uvloop<1.0.0,>=0.21.0; sys_platform != 'win32'
Provides-Extra: testing
Requires-Dist: pytest<9.0.0,>=8.2.1; extra == 'testing'
Requires-Dist: respx<1.0.0,>=0.22.0; extra == 'testing'
Version: 4.5.0

# galileo-core (in Orbit)

Shared schemas and configuration for Galileo's Python packages.

This package is now maintained inside the Orbit monorepo at `libs/python/core/`.

## Package Layout

```text
libs/python/core/
├── BUILD.bazel
├── README.md
├── galileo_core/
│   ├── __init__.py
│   ├── schemas/
│   ├── helpers/
│   ├── constants/
│   ├── exceptions/
│   ├── utils/
│   └── testing/
└── tests/
```

## Running Tests

Orbit is Bazel-first. Run tests with Bazel:

```bash
# Run core package tests
bazel test //libs/python/core:core_test

# Or run all tests in orbit
bazel test //...
```

## Building Distribution Artifacts

Build the wheel target with Bazel:

```bash
bazel build //libs/python/core:galileo_core_wheel
```

## Custom HTTP Headers (API gateways / IBM APIC)

When the Galileo API is fronted by a gateway (e.g. IBM APIC) that requires extra routing
or auth headers, set `GALILEO_EXTRA_HEADERS` to a JSON object mapping header names to
values. These headers are sent on every request that goes through `galileo_core`'s
`ApiClient` — that is, all core-backed flows: login, the pre-auth healthcheck, token
refresh, resource calls, and batch ingestion:

```bash
export GALILEO_EXTRA_HEADERS='{"ibm_client_id": "my_client_id", "ibm_client_secret": "my_client_secret"}'
```

Or pass them programmatically via the `extra_headers` config argument. Galileo's own
auth/content headers always take precedence on key collisions and cannot be overridden.

> **Scope:** this applies to requests issued through `galileo_core.helpers.api_client.ApiClient`.
> Legacy egress paths that build their own HTTP client (e.g. `setgalileo`'s assistant-tool
> requests) do not read `GalileoConfig.extra_headers` and are not covered here.

## Import Path

The import path remains:

```python
import galileo_core
```

This stays the same for both internal Orbit usage and external PyPI consumers.

## Publishing

`galileo-core` is published to public PyPI from Orbit workflows.

Use the `Orbit PyPI Release` workflow (`.github/workflows/orbit-pypi-release.yaml`):

- Trigger manually from `main` only.
- Set `package=core`.
- Leave `bump` empty to auto-infer semver from commits, or set `major|minor|patch` to override.

The workflow updates `libs/python/core/version.bzl`, creates a `vX.Y.Z` tag, builds `//libs/python/core:galileo_core_wheel`, and publishes to PyPI.

