Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: ./scripts/lint

build:
if: github.repository == 'stainless-sdks/openint-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
timeout-minutes: 10
name: build
permissions:
Expand All @@ -61,12 +61,14 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/openint-python'
id: github-oidc
uses: actions/github-script@v6
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/openint-python'
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.8.0"
".": "2.9.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openint%2Fopenint-a7212b4566ed125aa08bf8c11ec8e06cb155893a70fea4237e6c8524f9dfe2e9.yml
openapi_spec_hash: 962403d111f029b8911c5ec6acd6f215
config_hash: 4f1d196a8f57efed93da0f033aec310e
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openint%2Fopenint-8939526af685821b7c8d595a10525162c1ce8a0d14da26247f379595aa51df04.yml
openapi_spec_hash: d6482999678782fbf0190b20ab353a7b
config_hash: e2381d4d19e19a62ea5c13018808e3aa
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 2.9.0 (2025-08-26)

Full Changelog: [v2.8.0...v2.9.0](https://github.com/openintegrations/python-sdk/compare/v2.8.0...v2.9.0)

### Features

* **api-v2:** api v2 spec ([48aff10](https://github.com/openintegrations/python-sdk/commit/48aff10bbe28bb6f428f07c97ea5d005c35cb759))
* **docs:** updating documented docs for stainless ([444bab6](https://github.com/openintegrations/python-sdk/commit/444bab6f2527e7d21fc33b840cbdeec21fdddd8c))
* **docs:** updating documented docs for stainless ([316e546](https://github.com/openintegrations/python-sdk/commit/316e546bdb14eabb87ff0878545a21c1d7cef4a8))


### Chores

* update github action ([cd673e1](https://github.com/openintegrations/python-sdk/commit/cd673e1e7fff34115e2c735e458d53804c2f0628))

## 2.8.0 (2025-08-13)

Full Changelog: [v2.7.0...v2.8.0](https://github.com/openintegrations/python-sdk/compare/v2.7.0...v2.8.0)
Expand Down
50 changes: 37 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ client = Openint(
token=os.environ.get("OPENINT_API_KEY"), # This is the default and can be omitted
)

page = client.list_connections()
print(page.items)
response = client.assign_connection(
repl_id="replId",
id="conn_",
)
print(response.id)
```

While you can provide a `token` keyword argument,
Expand All @@ -56,8 +59,11 @@ client = AsyncOpenint(


async def main() -> None:
page = await client.list_connections()
print(page.items)
response = await client.assign_connection(
repl_id="replId",
id="conn_",
)
print(response.id)


asyncio.run(main())
Expand Down Expand Up @@ -89,8 +95,11 @@ async def main() -> None:
token="My Token",
http_client=DefaultAioHttpClient(),
) as client:
page = await client.list_connections()
print(page.items)
response = await client.assign_connection(
repl_id="replId",
id="conn_",
)
print(response.id)


asyncio.run(main())
Expand Down Expand Up @@ -137,7 +146,10 @@ from openint import Openint
client = Openint()

try:
client.list_connections()
client.assign_connection(
repl_id="replId",
id="conn_",
)
except openint.APIConnectionError as e:
print("The server could not be reached")
print(e.__cause__) # an underlying Exception, likely raised within httpx.
Expand Down Expand Up @@ -180,7 +192,10 @@ client = Openint(
)

# Or, configure per-request:
client.with_options(max_retries=5).list_connections()
client.with_options(max_retries=5).assign_connection(
repl_id="replId",
id="conn_",
)
```

### Timeouts
Expand All @@ -203,7 +218,10 @@ client = Openint(
)

# Override per-request:
client.with_options(timeout=5.0).list_connections()
client.with_options(timeout=5.0).assign_connection(
repl_id="replId",
id="conn_",
)
```

On timeout, an `APITimeoutError` is thrown.
Expand Down Expand Up @@ -244,11 +262,14 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
from openint import Openint

client = Openint()
response = client.with_raw_response.list_connections()
response = client.with_raw_response.assign_connection(
repl_id="replId",
id="conn_",
)
print(response.headers.get('X-My-Header'))

client = response.parse() # get the object that `list_connections()` would have returned
print(client)
client = response.parse() # get the object that `assign_connection()` would have returned
print(client.id)
```

These methods return an [`APIResponse`](https://github.com/openintegrations/python-sdk/tree/main/src/openint/_response.py) object.
Expand All @@ -262,7 +283,10 @@ The above interface eagerly reads the full response body when you make the reque
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.

```python
with client.with_streaming_response.list_connections() as response:
with client.with_streaming_response.assign_connection(
repl_id="replId",
id="conn_",
) as response:
print(response.headers.get("X-My-Header"))

for line in response.iter_lines():
Expand Down
42 changes: 24 additions & 18 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ Types:
from openint.types import (
Connector,
Integration,
AssignConnectionResponse,
CheckConnectionResponse,
CreateConnectionResponse,
CreateConnnectorConfigResponse,
CreateTokenResponse,
DeleteAssignmentResponse,
DeleteConnectionResponse,
DeleteConnectorConfigResponse,
GetConectorConfigResponse,
GetConnectionResponse,
GetCurrentUserResponse,
GetMessageTemplateResponse,
ListAssignmentsResponse,
ListConnectionConfigsResponse,
ListConnectionsResponse,
ListConnectorsResponse,
Expand All @@ -28,20 +31,23 @@ from openint.types import (

Methods:

- <code title="post /connection/{id}/check">client.<a href="./src/openint/_client.py">check_connection</a>(id) -> <a href="./src/openint/types/check_connection_response.py">CheckConnectionResponse</a></code>
- <code title="post /connection">client.<a href="./src/openint/_client.py">create_connection</a>(\*\*<a href="src/openint/types/client_create_connection_params.py">params</a>) -> <a href="./src/openint/types/create_connection_response.py">CreateConnectionResponse</a></code>
- <code title="post /connector-config">client.<a href="./src/openint/_client.py">create_connnector_config</a>(\*\*<a href="src/openint/types/client_create_connnector_config_params.py">params</a>) -> <a href="./src/openint/types/create_connnector_config_response.py">CreateConnnectorConfigResponse</a></code>
- <code title="post /customer/{customer_id}/token">client.<a href="./src/openint/_client.py">create_token</a>(customer_id, \*\*<a href="src/openint/types/client_create_token_params.py">params</a>) -> <a href="./src/openint/types/create_token_response.py">CreateTokenResponse</a></code>
- <code title="delete /connection/{id}">client.<a href="./src/openint/_client.py">delete_connection</a>(id) -> <a href="./src/openint/types/delete_connection_response.py">DeleteConnectionResponse</a></code>
- <code title="get /connector-config/{id}">client.<a href="./src/openint/_client.py">get_conector_config</a>(id, \*\*<a href="src/openint/types/client_get_conector_config_params.py">params</a>) -> <a href="./src/openint/types/get_conector_config_response.py">GetConectorConfigResponse</a></code>
- <code title="get /connection/{id}">client.<a href="./src/openint/_client.py">get_connection</a>(id, \*\*<a href="src/openint/types/client_get_connection_params.py">params</a>) -> <a href="./src/openint/types/get_connection_response.py">GetConnectionResponse</a></code>
- <code title="get /viewer">client.<a href="./src/openint/_client.py">get_current_user</a>() -> <a href="./src/openint/types/get_current_user_response.py">GetCurrentUserResponse</a></code>
- <code title="get /ai/message_template">client.<a href="./src/openint/_client.py">get_message_template</a>(\*\*<a href="src/openint/types/client_get_message_template_params.py">params</a>) -> <a href="./src/openint/types/get_message_template_response.py">GetMessageTemplateResponse</a></code>
- <code title="get /connector-config">client.<a href="./src/openint/_client.py">list_connection_configs</a>(\*\*<a href="src/openint/types/client_list_connection_configs_params.py">params</a>) -> <a href="./src/openint/types/list_connection_configs_response.py">SyncOffsetPagination[ListConnectionConfigsResponse]</a></code>
- <code title="get /connection">client.<a href="./src/openint/_client.py">list_connections</a>(\*\*<a href="src/openint/types/client_list_connections_params.py">params</a>) -> <a href="./src/openint/types/list_connections_response.py">SyncOffsetPagination[ListConnectionsResponse]</a></code>
- <code title="get /connector">client.<a href="./src/openint/_client.py">list_connectors</a>(\*\*<a href="src/openint/types/client_list_connectors_params.py">params</a>) -> <a href="./src/openint/types/list_connectors_response.py">SyncOffsetPagination[ListConnectorsResponse]</a></code>
- <code title="get /connector-config">client.<a href="./src/openint/_client.py">list_connnector_configs</a>(\*\*<a href="src/openint/types/client_list_connnector_configs_params.py">params</a>) -> <a href="./src/openint/types/list_connnector_configs_response.py">SyncOffsetPagination[ListConnnectorConfigsResponse]</a></code>
- <code title="get /customer">client.<a href="./src/openint/_client.py">list_customers</a>(\*\*<a href="src/openint/types/client_list_customers_params.py">params</a>) -> <a href="./src/openint/types/list_customers_response.py">SyncOffsetPagination[ListCustomersResponse]</a></code>
- <code title="get /event">client.<a href="./src/openint/_client.py">list_events</a>(\*\*<a href="src/openint/types/client_list_events_params.py">params</a>) -> <a href="./src/openint/types/list_events_response.py">SyncOffsetPagination[ListEventsResponse]</a></code>
- <code title="put /connector-config/{id}">client.<a href="./src/openint/_client.py">upsert_connnector_config</a>(id, \*\*<a href="src/openint/types/client_upsert_connnector_config_params.py">params</a>) -> <a href="./src/openint/types/upsert_connnector_config_response.py">UpsertConnnectorConfigResponse</a></code>
- <code title="put /customer">client.<a href="./src/openint/_client.py">upsert_customer</a>(\*\*<a href="src/openint/types/client_upsert_customer_params.py">params</a>) -> <a href="./src/openint/types/upsert_customer_response.py">UpsertCustomerResponse</a></code>
- <code title="put /v2/connection/{id}/assignment/{replId}">client.<a href="./src/openint/_client.py">assign_connection</a>(repl_id, \*, id) -> <a href="./src/openint/types/assign_connection_response.py">AssignConnectionResponse</a></code>
- <code title="post /v1/connection/{id}/check">client.<a href="./src/openint/_client.py">check_connection</a>(id) -> <a href="./src/openint/types/check_connection_response.py">CheckConnectionResponse</a></code>
- <code title="post /v2/connection">client.<a href="./src/openint/_client.py">create_connection</a>(\*\*<a href="src/openint/types/client_create_connection_params.py">params</a>) -> <a href="./src/openint/types/create_connection_response.py">CreateConnectionResponse</a></code>
- <code title="post /v2/connector-config">client.<a href="./src/openint/_client.py">create_connnector_config</a>(\*\*<a href="src/openint/types/client_create_connnector_config_params.py">params</a>) -> <a href="./src/openint/types/create_connnector_config_response.py">CreateConnnectorConfigResponse</a></code>
- <code title="post /v1/customer/{customer_id}/token">client.<a href="./src/openint/_client.py">create_token</a>(customer_id, \*\*<a href="src/openint/types/client_create_token_params.py">params</a>) -> <a href="./src/openint/types/create_token_response.py">CreateTokenResponse</a></code>
- <code title="delete /v2/connection/{id}/assignment/{replId}">client.<a href="./src/openint/_client.py">delete_assignment</a>(repl_id, \*, id) -> <a href="./src/openint/types/delete_assignment_response.py">DeleteAssignmentResponse</a></code>
- <code title="delete /v2/connection/{id}">client.<a href="./src/openint/_client.py">delete_connection</a>(id) -> <a href="./src/openint/types/delete_connection_response.py">DeleteConnectionResponse</a></code>
- <code title="delete /v2/connector-config/{id}">client.<a href="./src/openint/_client.py">delete_connector_config</a>(id) -> <a href="./src/openint/types/delete_connector_config_response.py">DeleteConnectorConfigResponse</a></code>
- <code title="get /v2/connector-config/{id}">client.<a href="./src/openint/_client.py">get_conector_config</a>(id, \*\*<a href="src/openint/types/client_get_conector_config_params.py">params</a>) -> <a href="./src/openint/types/get_conector_config_response.py">GetConectorConfigResponse</a></code>
- <code title="get /v2/connection/{id}">client.<a href="./src/openint/_client.py">get_connection</a>(id, \*\*<a href="src/openint/types/client_get_connection_params.py">params</a>) -> <a href="./src/openint/types/get_connection_response.py">GetConnectionResponse</a></code>
- <code title="get /v1/viewer">client.<a href="./src/openint/_client.py">get_current_user</a>() -> <a href="./src/openint/types/get_current_user_response.py">GetCurrentUserResponse</a></code>
- <code title="get /v2/connection/{id}/assignment">client.<a href="./src/openint/_client.py">list_assignments</a>(id) -> <a href="./src/openint/types/list_assignments_response.py">ListAssignmentsResponse</a></code>
- <code title="get /v2/connector-config">client.<a href="./src/openint/_client.py">list_connection_configs</a>(\*\*<a href="src/openint/types/client_list_connection_configs_params.py">params</a>) -> <a href="./src/openint/types/list_connection_configs_response.py">SyncOffsetPagination[ListConnectionConfigsResponse]</a></code>
- <code title="get /v2/connection">client.<a href="./src/openint/_client.py">list_connections</a>(\*\*<a href="src/openint/types/client_list_connections_params.py">params</a>) -> <a href="./src/openint/types/list_connections_response.py">SyncOffsetPagination[ListConnectionsResponse]</a></code>
- <code title="get /v2/connector">client.<a href="./src/openint/_client.py">list_connectors</a>(\*\*<a href="src/openint/types/client_list_connectors_params.py">params</a>) -> <a href="./src/openint/types/list_connectors_response.py">SyncOffsetPagination[ListConnectorsResponse]</a></code>
- <code title="get /v2/connector-config">client.<a href="./src/openint/_client.py">list_connnector_configs</a>(\*\*<a href="src/openint/types/client_list_connnector_configs_params.py">params</a>) -> <a href="./src/openint/types/list_connnector_configs_response.py">SyncOffsetPagination[ListConnnectorConfigsResponse]</a></code>
- <code title="get /v1/customer">client.<a href="./src/openint/_client.py">list_customers</a>(\*\*<a href="src/openint/types/client_list_customers_params.py">params</a>) -> <a href="./src/openint/types/list_customers_response.py">SyncOffsetPagination[ListCustomersResponse]</a></code>
- <code title="get /v1/event">client.<a href="./src/openint/_client.py">list_events</a>(\*\*<a href="src/openint/types/client_list_events_params.py">params</a>) -> <a href="./src/openint/types/list_events_response.py">SyncOffsetPagination[ListEventsResponse]</a></code>
- <code title="put /v2/connector-config/{id}">client.<a href="./src/openint/_client.py">upsert_connnector_config</a>(id, \*\*<a href="src/openint/types/client_upsert_connnector_config_params.py">params</a>) -> <a href="./src/openint/types/upsert_connnector_config_response.py">UpsertConnnectorConfigResponse</a></code>
- <code title="put /v1/customer">client.<a href="./src/openint/_client.py">upsert_customer</a>(\*\*<a href="src/openint/types/client_upsert_customer_params.py">params</a>) -> <a href="./src/openint/types/upsert_customer_response.py">UpsertCustomerResponse</a></code>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openint"
version = "2.8.0"
version = "2.9.0"
description = "The official Python library for the Openint API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
Loading
Loading