Skip to content

release: 2.8.0 #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9a8cb2f
chore(docs): remove reference to rye shell
stainless-app[bot] Jun 3, 2025
eeb75d3
chore(docs): remove unnecessary param examples
stainless-app[bot] Jun 3, 2025
b9b9a31
feat(client): add follow_redirects request option
stainless-app[bot] Jun 3, 2025
2944351
chore(tests): run tests in parallel
stainless-app[bot] Jun 13, 2025
caa6b27
fix(client): correctly parse binary response | stream
stainless-app[bot] Jun 13, 2025
fb80b72
chore(tests): add tests for httpx client instantiation & proxies
stainless-app[bot] Jun 17, 2025
c7fb0bb
chore(internal): update conftest.py
stainless-app[bot] Jun 17, 2025
931d7a6
chore(ci): enable for pull requests
stainless-app[bot] Jun 17, 2025
80e3c80
chore(readme): update badges
stainless-app[bot] Jun 18, 2025
defb222
docs(client): fix httpx.Timeout documentation reference
stainless-app[bot] Jun 19, 2025
1f74a9a
feat(client): add support for aiohttp
stainless-app[bot] Jun 21, 2025
a49ae20
chore(tests): skip some failing tests on the latest python versions
stainless-app[bot] Jun 24, 2025
afdd5f4
fix(ci): release-doctor — report correct token name
stainless-app[bot] Jun 27, 2025
4d50fa2
feat(docs): updating documented docs for stainless
stainless-app[bot] Jun 28, 2025
7dc816a
chore(ci): only run for pushes and fork pull requests
stainless-app[bot] Jun 28, 2025
3c5fa29
fix(ci): correct conditional
stainless-app[bot] Jun 30, 2025
3617fa8
chore(ci): change upload type
stainless-app[bot] Jul 2, 2025
6676d2c
release: 2.8.0
stainless-app[bot] Jul 2, 2025
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
26 changes: 23 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ on:
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/openint-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand All @@ -30,17 +35,31 @@ jobs:
- name: Run lints
run: ./scripts/lint

upload:
if: github.repository == 'stainless-sdks/openint-python'
build:
if: github.repository == 'stainless-sdks/openint-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
timeout-minutes: 10
name: upload
name: build
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Install dependencies
run: rye sync --all-features

- name: Run build
run: rye build

- name: Get GitHub OIDC Token
id: github-oidc
uses: actions/github-script@v6
Expand All @@ -58,6 +77,7 @@ jobs:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/openint-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

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.7.0"
".": "2.8.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 11
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openint%2Fopenint-d6333dfcc2d3e03c7e00b0f9eedc0cbeebd9174cbebbbb75cdc5938d70113e2e.yml
openapi_spec_hash: 7033d26ed782ee5cfca8fd61b6dd5d84
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openint%2Fopenint-0a4eb274ac57a4d4bd8936015f41147c7cd218a13446aea787cd0cf063af66cf.yml
openapi_spec_hash: 2ec6f02a72534100a5bdf0dc709dc6dd
config_hash: 287d5109de5717d392756a2fbe488e49
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

## 2.8.0 (2025-07-02)

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

### Features

* **client:** add follow_redirects request option ([b9b9a31](https://github.com/openintegrations/python-sdk/commit/b9b9a31b91ad89eaaae440a5c0e979b18cd80d9e))
* **client:** add support for aiohttp ([1f74a9a](https://github.com/openintegrations/python-sdk/commit/1f74a9a2c8ff4e8d92991f5d6d2a1b41eb0bef0e))
* **docs:** updating documented docs for stainless ([4d50fa2](https://github.com/openintegrations/python-sdk/commit/4d50fa222eaac99eb9b71b01c192c002720852cf))


### Bug Fixes

* **ci:** correct conditional ([3c5fa29](https://github.com/openintegrations/python-sdk/commit/3c5fa29b84f0bfdf76f05b7adca4cf8374afe425))
* **ci:** release-doctor — report correct token name ([afdd5f4](https://github.com/openintegrations/python-sdk/commit/afdd5f492ce333fb11913b2c247b9af8292f1f24))
* **client:** correctly parse binary response | stream ([caa6b27](https://github.com/openintegrations/python-sdk/commit/caa6b273178dbed4a68f007498fdc1aa0bd806b1))


### Chores

* **ci:** change upload type ([3617fa8](https://github.com/openintegrations/python-sdk/commit/3617fa8cb1ce2407e0368a4bde03a29380dc6163))
* **ci:** enable for pull requests ([931d7a6](https://github.com/openintegrations/python-sdk/commit/931d7a69639ed5e97247b25d7948830bd0f6722e))
* **ci:** only run for pushes and fork pull requests ([7dc816a](https://github.com/openintegrations/python-sdk/commit/7dc816a1047a7b076b85745aa9cea3074e8657ea))
* **docs:** remove reference to rye shell ([9a8cb2f](https://github.com/openintegrations/python-sdk/commit/9a8cb2f511a40dfdfbd2ab037505b15e95b2b5a4))
* **docs:** remove unnecessary param examples ([eeb75d3](https://github.com/openintegrations/python-sdk/commit/eeb75d3ba0620c94e84975c3963f751545c3e525))
* **internal:** update conftest.py ([c7fb0bb](https://github.com/openintegrations/python-sdk/commit/c7fb0bbc6dae0c4f04f6d71b9b247fdbd7c455fd))
* **readme:** update badges ([80e3c80](https://github.com/openintegrations/python-sdk/commit/80e3c8052559c503805acce6b9371fd8fa61e2f4))
* **tests:** add tests for httpx client instantiation & proxies ([fb80b72](https://github.com/openintegrations/python-sdk/commit/fb80b72788f99715598043f3f8fd807f207a6041))
* **tests:** run tests in parallel ([2944351](https://github.com/openintegrations/python-sdk/commit/2944351d65ce2c8a2499377f508b0ed3d32211ec))
* **tests:** skip some failing tests on the latest python versions ([a49ae20](https://github.com/openintegrations/python-sdk/commit/a49ae20e614483d37f8353da78c0c2c731287342))


### Documentation

* **client:** fix httpx.Timeout documentation reference ([defb222](https://github.com/openintegrations/python-sdk/commit/defb22221843470910685c6aef3ca0c5e0805db2))

## 2.7.0 (2025-05-30)

Full Changelog: [v2.6.0...v2.7.0](https://github.com/openintegrations/python-sdk/compare/v2.6.0...v2.7.0)
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ $ rye sync --all-features
You can then run scripts using `rye run python script.py` or by activating the virtual environment:

```sh
$ rye shell
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
$ source .venv/bin/activate

# now you can omit the `rye run` prefix
Expand Down
44 changes: 35 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Openint Python API library

[![PyPI version](https://img.shields.io/pypi/v/openint.svg)](https://pypi.org/project/openint/)
[![PyPI version](<https://img.shields.io/pypi/v/openint.svg?label=pypi%20(stable)>)](https://pypi.org/project/openint/)

The Openint Python library provides convenient access to the Openint REST API from any Python 3.8+
application. The library includes type definitions for all request params and response fields,
Expand Down Expand Up @@ -64,6 +64,38 @@ asyncio.run(main())

Functionality between the synchronous and asynchronous clients is otherwise identical.

### With aiohttp

By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.

You can enable this by installing `aiohttp`:

```sh
# install from PyPI
pip install openint[aiohttp]
```

Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from openint import DefaultAioHttpClient
from openint import AsyncOpenint


async def main() -> None:
async with AsyncOpenint(
token=os.environ.get("OPENINT_API_KEY"), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
page = await client.list_connections()
print(page.items)


asyncio.run(main())
```

## Using types

Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
Expand All @@ -84,13 +116,7 @@ client = Openint()

response = client.create_token(
customer_id="x",
connect_options={
"connector_names": ["accelo"],
"debug": True,
"is_embedded": True,
"return_url": "return_url",
"view": "add",
},
connect_options={},
)
print(response.connect_options)
```
Expand Down Expand Up @@ -160,7 +186,7 @@ client.with_options(max_retries=5).list_connections()
### Timeouts

By default requests time out after 1 minute. You can configure this with a `timeout` option,
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:

```python
from openint import Openint
Expand Down
2 changes: 0 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Types:
from openint.types import (
Connector,
Integration,
OAuthConnectionSettings,
OAuthConnectorConfig,
CheckConnectionResponse,
CreateConnectionResponse,
CreateTokenResponse,
Expand Down
2 changes: 1 addition & 1 deletion bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
errors=()

if [ -z "${PYPI_TOKEN}" ]; then
errors+=("The OPENINT_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
fi

lenErrors=${#errors[@]}
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openint"
version = "2.7.0"
version = "2.8.0"
description = "The official Python library for the Openint API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -37,6 +37,8 @@ classifiers = [
Homepage = "https://github.com/openintegrations/python-sdk"
Repository = "https://github.com/openintegrations/python-sdk"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]

[tool.rye]
managed = true
Expand All @@ -54,6 +56,7 @@ dev-dependencies = [
"importlib-metadata>=6.7.0",
"rich>=13.7.1",
"nest_asyncio==1.6.0",
"pytest-xdist>=3.6.1",
]

[tool.rye.scripts]
Expand Down Expand Up @@ -125,7 +128,7 @@ replacement = '[\1](https://github.com/openintegrations/python-sdk/tree/main/\g<

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--tb=short"
addopts = "--tb=short -n auto"
xfail_strict = true
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
Expand Down
31 changes: 31 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,24 @@
# universal: false

-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.12.8
# via httpx-aiohttp
# via openint
aiosignal==1.3.2
# via aiohttp
annotated-types==0.6.0
# via pydantic
anyio==4.4.0
# via httpx
# via openint
argcomplete==3.1.2
# via nox
async-timeout==5.0.1
# via aiohttp
attrs==25.3.0
# via aiohttp
certifi==2023.7.22
# via httpcore
# via httpx
Expand All @@ -30,25 +41,37 @@ distro==1.8.0
exceptiongroup==1.2.2
# via anyio
# via pytest
execnet==2.1.1
# via pytest-xdist
filelock==3.12.4
# via virtualenv
frozenlist==1.6.2
# via aiohttp
# via aiosignal
h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.28.1
# via httpx-aiohttp
# via openint
# via respx
httpx-aiohttp==0.1.6
# via openint
idna==3.4
# via anyio
# via httpx
# via yarl
importlib-metadata==7.0.0
iniconfig==2.0.0
# via pytest
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
multidict==6.4.4
# via aiohttp
# via yarl
mypy==1.14.1
mypy-extensions==1.0.0
# via mypy
Expand All @@ -63,6 +86,9 @@ platformdirs==3.11.0
# via virtualenv
pluggy==1.5.0
# via pytest
propcache==0.3.1
# via aiohttp
# via yarl
pydantic==2.10.3
# via openint
pydantic-core==2.27.1
Expand All @@ -72,7 +98,9 @@ pygments==2.18.0
pyright==1.1.399
pytest==8.3.3
# via pytest-asyncio
# via pytest-xdist
pytest-asyncio==0.24.0
pytest-xdist==3.7.0
python-dateutil==2.8.2
# via time-machine
pytz==2023.3.post1
Expand All @@ -93,12 +121,15 @@ tomli==2.0.2
# via pytest
typing-extensions==4.12.2
# via anyio
# via multidict
# via mypy
# via openint
# via pydantic
# via pydantic-core
# via pyright
virtualenv==20.24.5
# via nox
yarl==1.20.0
# via aiohttp
zipp==3.17.0
# via importlib-metadata
Loading