Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6dbed91
chore(internal): add missing files argument to base client
stainless-app[bot] Dec 16, 2025
32fb2cc
chore: speedup initial import
stainless-app[bot] Dec 17, 2025
a3b137a
fix: use async_to_httpx_files in patch method
stainless-app[bot] Dec 18, 2025
e8d9998
chore(internal): add `--fix` argument to lint script
stainless-app[bot] Dec 19, 2025
eb02a83
chore(internal): codegen related update
stainless-app[bot] Jan 6, 2026
af955ca
fix(client): loosen auth header validation
stainless-app[bot] Jan 8, 2026
9c92b6a
feat(client): add support for binary request streaming
stainless-app[bot] Jan 14, 2026
0d17288
chore(internal): update `actions/checkout` version
stainless-app[bot] Jan 17, 2026
e2ea5fd
chore(ci): upgrade `actions/github-script`
stainless-app[bot] Jan 24, 2026
7daf14d
feat(client): add custom JSON encoder for extended type support
stainless-app[bot] Jan 30, 2026
53cb8a0
chore(internal): bump dependencies
stainless-app[bot] Feb 9, 2026
8a7fe14
chore(internal): fix lint error on Python 3.14
stainless-app[bot] Feb 11, 2026
0a364e2
chore: format all `api.md` files
stainless-app[bot] Feb 12, 2026
961b979
chore(internal): remove mock server code
stainless-app[bot] Feb 19, 2026
168a3b8
chore: update mock server docs
stainless-app[bot] Feb 19, 2026
986b89d
chore(internal): add request options to SSE classes
stainless-app[bot] Feb 23, 2026
b33f0fb
chore(internal): make `test_proxy_environment_variables` more resilient
stainless-app[bot] Feb 23, 2026
d60d095
chore(internal): make `test_proxy_environment_variables` more resilie…
stainless-app[bot] Feb 24, 2026
9dd7392
chore(docs): add missing descriptions
stainless-app[bot] Feb 27, 2026
a64ce59
chore(ci): skip uploading artifacts on stainless-internal branches
stainless-app[bot] Mar 7, 2026
6f9b35c
fix(pydantic): do not pass `by_alias` unless set
stainless-app[bot] Mar 16, 2026
aa94631
fix(deps): bump minimum typing-extensions version
stainless-app[bot] Mar 16, 2026
e723bef
chore(internal): tweak CI branches
stainless-app[bot] Mar 16, 2026
3e5e2da
release: 2.1.0
stainless-app[bot] Mar 16, 2026
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
30 changes: 18 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: CI
on:
push:
branches-ignore:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
Expand All @@ -19,7 +21,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/postgrid-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand All @@ -44,7 +46,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/postgrid-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand All @@ -61,14 +63,18 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/postgrid-python'
if: |-
github.repository == 'stainless-sdks/postgrid-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/postgrid-python'
if: |-
github.repository == 'stainless-sdks/postgrid-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand All @@ -81,7 +87,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/postgrid-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'postgrid/postgrid-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
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.0.3"
".": "2.1.0"
}
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## 2.1.0 (2026-03-16)

Full Changelog: [v2.0.3...v2.1.0](https://github.com/postgrid/postgrid-python/compare/v2.0.3...v2.1.0)

### Features

* **client:** add custom JSON encoder for extended type support ([7daf14d](https://github.com/postgrid/postgrid-python/commit/7daf14d1ea87c9036961bbcc15399e90ed118cbb))
* **client:** add support for binary request streaming ([9c92b6a](https://github.com/postgrid/postgrid-python/commit/9c92b6a0f2411b015adf447dffa582836bc1ac4a))


### Bug Fixes

* **client:** loosen auth header validation ([af955ca](https://github.com/postgrid/postgrid-python/commit/af955ca7182b4f032d6d9c10faf060668fa43248))
* **deps:** bump minimum typing-extensions version ([aa94631](https://github.com/postgrid/postgrid-python/commit/aa94631c7c4fd65cff55b9d86263aa1926dd4f75))
* **pydantic:** do not pass `by_alias` unless set ([6f9b35c](https://github.com/postgrid/postgrid-python/commit/6f9b35c003e312b228ba36b527a09671b0700039))
* use async_to_httpx_files in patch method ([a3b137a](https://github.com/postgrid/postgrid-python/commit/a3b137ae1ab33697009d7b508a8d22f7349b9dec))


### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([a64ce59](https://github.com/postgrid/postgrid-python/commit/a64ce5957d66b86e6d14bdcf4ed29eb12f5d559c))
* **ci:** upgrade `actions/github-script` ([e2ea5fd](https://github.com/postgrid/postgrid-python/commit/e2ea5fdecfc467358d53198d37f153ea7f7bf0cf))
* **docs:** add missing descriptions ([9dd7392](https://github.com/postgrid/postgrid-python/commit/9dd73922effb1185e3ef1a21cf0118f1b1319384))
* format all `api.md` files ([0a364e2](https://github.com/postgrid/postgrid-python/commit/0a364e28d4d8c4039925ead02608bcc66f6253f8))
* **internal:** add `--fix` argument to lint script ([e8d9998](https://github.com/postgrid/postgrid-python/commit/e8d9998a7bc735ebb82e4071f479b6d811746abd))
* **internal:** add missing files argument to base client ([6dbed91](https://github.com/postgrid/postgrid-python/commit/6dbed918a54c190cda4e2b7c1c8b56867bde3562))
* **internal:** add request options to SSE classes ([986b89d](https://github.com/postgrid/postgrid-python/commit/986b89d9ed6752401d1a0a2caa05a74b3fc805ff))
* **internal:** bump dependencies ([53cb8a0](https://github.com/postgrid/postgrid-python/commit/53cb8a03ab0c3d88881b7c2acdde5288f8511f7e))
* **internal:** codegen related update ([eb02a83](https://github.com/postgrid/postgrid-python/commit/eb02a837ede94d5440593cb9c921c6e47ae5a0ab))
* **internal:** fix lint error on Python 3.14 ([8a7fe14](https://github.com/postgrid/postgrid-python/commit/8a7fe146bf634f2fab49203e50eca29f43f3f1c3))
* **internal:** make `test_proxy_environment_variables` more resilient ([b33f0fb](https://github.com/postgrid/postgrid-python/commit/b33f0fb4114274c85f1c0441f17bde2de3500180))
* **internal:** make `test_proxy_environment_variables` more resilient to env ([d60d095](https://github.com/postgrid/postgrid-python/commit/d60d09529bdcb3df50effb16c004a04c5ab76e8c))
* **internal:** remove mock server code ([961b979](https://github.com/postgrid/postgrid-python/commit/961b979236edcd88d3c3f2b03f1033940b188bd2))
* **internal:** tweak CI branches ([e723bef](https://github.com/postgrid/postgrid-python/commit/e723befd334a20b5f8b02322edfb84dd19c46337))
* **internal:** update `actions/checkout` version ([0d17288](https://github.com/postgrid/postgrid-python/commit/0d1728886ee999032574dd9877bc85c84930bc3b))
* speedup initial import ([32fb2cc](https://github.com/postgrid/postgrid-python/commit/32fb2cceb7859e77a4840e4f45bc782123aa0359))
* update mock server docs ([168a3b8](https://github.com/postgrid/postgrid-python/commit/168a3b8c77755038a1fefd557d71ad49f753a360))

## 2.0.3 (2025-12-09)

Full Changelog: [v2.0.2...v2.0.3](https://github.com/postgrid/postgrid-python/compare/v2.0.2...v2.0.3)
Expand Down
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ $ pip install ./path-to-wheel-file.whl

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
# you will need npm installed
$ npx prism mock path/to/your/openapi.yml
```

```sh
$ ./scripts/test
```
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 PostGrid
Copyright 2026 PostGrid

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "postgrid-python"
version = "2.0.3"
version = "2.1.0"
description = "The official Python library for the PostGrid API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand All @@ -11,7 +11,7 @@ authors = [
dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"typing-extensions>=4.14, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
Expand Down Expand Up @@ -69,7 +69,7 @@ format = { chain = [
# run formatting again to fix any inconsistencies when imports are stripped
"format:ruff",
]}
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'"
"format:ruff" = "ruff format"

"lint" = { chain = [
Expand Down
20 changes: 10 additions & 10 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.13.2
aiohttp==3.13.3
# via httpx-aiohttp
# via postgrid-python
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
anyio==4.12.0
anyio==4.12.1
# via httpx
# via postgrid-python
argcomplete==3.6.3
Expand All @@ -31,7 +31,7 @@ attrs==25.4.0
# via nox
backports-asyncio-runner==1.2.0
# via pytest-asyncio
certifi==2025.11.12
certifi==2026.1.4
# via httpcore
# via httpx
colorlog==6.10.1
Expand Down Expand Up @@ -61,15 +61,15 @@ httpx==0.28.1
# via httpx-aiohttp
# via postgrid-python
# via respx
httpx-aiohttp==0.1.9
httpx-aiohttp==0.1.12
# via postgrid-python
humanize==4.13.0
# via nox
idna==3.11
# via anyio
# via httpx
# via yarl
importlib-metadata==8.7.0
importlib-metadata==8.7.1
iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
Expand All @@ -82,14 +82,14 @@ multidict==6.7.0
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
nodeenv==1.9.1
nodeenv==1.10.0
# via pyright
nox==2025.11.12
packaging==25.0
# via dependency-groups
# via nox
# via pytest
pathspec==0.12.1
pathspec==1.0.3
# via mypy
platformdirs==4.4.0
# via virtualenv
Expand All @@ -115,13 +115,13 @@ python-dateutil==2.9.0.post0
# via time-machine
respx==0.22.0
rich==14.2.0
ruff==0.14.7
ruff==0.14.13
six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via postgrid-python
time-machine==2.19.0
tomli==2.3.0
tomli==2.4.0
# via dependency-groups
# via mypy
# via nox
Expand All @@ -141,7 +141,7 @@ typing-extensions==4.15.0
# via virtualenv
typing-inspection==0.4.2
# via pydantic
virtualenv==20.35.4
virtualenv==20.36.1
# via nox
yarl==1.22.0
# via aiohttp
Expand Down
8 changes: 4 additions & 4 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.13.2
aiohttp==3.13.3
# via httpx-aiohttp
# via postgrid-python
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
anyio==4.12.0
anyio==4.12.1
# via httpx
# via postgrid-python
async-timeout==5.0.1
# via aiohttp
attrs==25.4.0
# via aiohttp
certifi==2025.11.12
certifi==2026.1.4
# via httpcore
# via httpx
distro==1.9.0
Expand All @@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via httpx-aiohttp
# via postgrid-python
httpx-aiohttp==0.1.9
httpx-aiohttp==0.1.12
# via postgrid-python
idna==3.11
# via anyio
Expand Down
9 changes: 7 additions & 2 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running lints"
rye run lint
if [ "$1" = "--fix" ]; then
echo "==> Running lints with --fix"
rye run fix:ruff
else
echo "==> Running lints"
rye run lint
fi

echo "==> Making sure it imports"
rye run python -c 'import postgrid'
41 changes: 0 additions & 41 deletions scripts/mock

This file was deleted.

Loading
Loading