Metadata-Version: 2.5
Name: oggrestapi
Version: 1.0.3
Summary: Python client for the Oracle GoldenGate REST API
Project-URL: Repository, https://github.com/juliendlttr/ogg
Author: Julien DELATTRE
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.6
Requires-Dist: requests
Requires-Dist: urllib3
Description-Content-Type: text/markdown

# oggrestapi

A Python client for the Oracle GoldenGate REST API.

## Install

```bash
pip install oggrestapi
```

## Usage

```python
from oggrestapi import OGGRestAPI

# Initialize the client when using a reverse proxy
ogg_client = OGGRestAPI(
    url='https://vmogg',
    username='ogg',
    deployment='ogg_test_01',
    reverse_proxy=True
)

# Initialize the client with auto-discovery, when using the same credentials for all services
ogg_client = OGGRestAPI(
    url='https://vmogg:7809',
    username='ogg',
    deployment='ogg_test_01',
    auto_discovery=True
)

# Initialize the client against a single service
ogg_client = OGGRestAPI(
    url='https://vmogg:7810',
    username='ogg'
)

# Example of a built-in endpoint: Get a list of all extracts
extracts = ogg_client.list_extracts()

>>> print(extracts)
[{'name': 'EXT1', 'status': 'running'}, {'name': 'EXT2', 'status': 'running'}]

# Example of a custom method: Patch all deployments of a GoldenGate setup
>>> ogg_client.patch_deployments(new_home='/u01/app/ogg/product/23.26.3.0.4')
```
