Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4ea0387
feat(api): add `description` field to chats, make `title` optional
stainless-app[bot] Oct 23, 2025
5449667
fix(client): close streams without requiring full consumption
stainless-app[bot] Oct 30, 2025
3b3c246
chore(internal/tests): avoid race condition with implicit client cleanup
stainless-app[bot] Oct 31, 2025
9dd17e2
chore(internal): grammar fix (it's -> its)
stainless-app[bot] Nov 4, 2025
3926021
chore(package): drop Python 3.8 support
stainless-app[bot] Nov 11, 2025
ed03f21
fix: compat with Python 3.14
stainless-app[bot] Nov 11, 2025
e185aed
fix(compat): update signatures of `model_dump` and `model_dump_json` …
stainless-app[bot] Nov 12, 2025
e735dc0
chore: add Python 3.14 classifier and testing
stainless-app[bot] Nov 22, 2025
3a660be
fix: ensure streams are always closed
stainless-app[bot] Nov 28, 2025
1963ec3
chore(deps): mypy 1.18.1 has a regression, pin to 1.17
stainless-app[bot] Nov 28, 2025
366d69a
chore: update lockfile
stainless-app[bot] Dec 3, 2025
b8c7ffb
chore(docs): use environment variables for authentication in code sni…
stainless-app[bot] Dec 3, 2025
9a11f98
fix(types): allow pyright to infer TypedDict types within SequenceNotStr
stainless-app[bot] Dec 9, 2025
ec4dacb
chore: add missing docstrings
stainless-app[bot] Dec 9, 2025
85e06b8
chore(internal): add missing files argument to base client
stainless-app[bot] Dec 16, 2025
78578a1
chore: speedup initial import
stainless-app[bot] Dec 17, 2025
f37e9db
fix: use async_to_httpx_files in patch method
stainless-app[bot] Dec 18, 2025
d958469
chore(internal): add `--fix` argument to lint script
stainless-app[bot] Dec 19, 2025
be5fb2d
chore(internal): codegen related update
stainless-app[bot] Jan 6, 2026
cc7035b
docs: prominently feature MCP server setup in root SDK readmes
stainless-app[bot] Jan 6, 2026
ea509da
feat(client): add support for binary request streaming
stainless-app[bot] Jan 14, 2026
d82497d
chore(internal): update `actions/checkout` version
stainless-app[bot] Jan 17, 2026
df55111
chore: configure new SDK language
stainless-app[bot] Jan 23, 2026
b73273f
feat(api): add upload asset and edit message endpoints
stainless-app[bot] Jan 23, 2026
9e0265f
feat(api): manual updates
stainless-app[bot] Jan 23, 2026
108db8e
feat(api): remove mcp for now
stainless-app[bot] Jan 23, 2026
b90bab2
codegen metadata
stainless-app[bot] Jan 24, 2026
8522929
codegen metadata
stainless-app[bot] Jan 24, 2026
c428c2e
chore(ci): upgrade `actions/github-script`
stainless-app[bot] Jan 24, 2026
1c4118f
release: 4.2.0
stainless-app[bot] Jan 24, 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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/beeper-desktop-api-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 +44,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/beeper-desktop-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/beeper-desktop-api-python'
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -81,7 +81,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/beeper-desktop-api-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 == 'beeper/desktop-api-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 @@
{
".": "4.1.296"
".": "4.2.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: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-0763b61997721da6f4514241bf0f7bb5f7a88c7298baf0f1b2d58036aaf7e2f1.yml
openapi_spec_hash: 5158475919c04bb52fb03c6a4582188d
config_hash: 5fa7ded4bfdffe4cc1944a819da87f9f
configured_endpoints: 18
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-5fb80d7f97f2428d1826b9c381476f0d46117fc694140175dbc15920b1884f1f.yml
openapi_spec_hash: 06f8538bc0a27163d33a80c00fb16e86
config_hash: 196c1c81b169ede101a71d1cf2796d99
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Changelog

## 4.2.0 (2026-01-24)

Full Changelog: [v4.1.296...v4.2.0](https://github.com/beeper/desktop-api-python/compare/v4.1.296...v4.2.0)

### Features

* **api:** add `description` field to chats, make `title` optional ([4ea0387](https://github.com/beeper/desktop-api-python/commit/4ea0387eaec221fd3bbfc38dd0d78bec923a8d81))
* **api:** add upload asset and edit message endpoints ([b73273f](https://github.com/beeper/desktop-api-python/commit/b73273f6831278207d89927097e1cfcfaba7a22a))
* **api:** manual updates ([9e0265f](https://github.com/beeper/desktop-api-python/commit/9e0265f5155064f9c253ed17614e701a13ce39cf))
* **api:** remove mcp for now ([108db8e](https://github.com/beeper/desktop-api-python/commit/108db8e71d02f8457e88f6299597ecad23f756ea))
* **client:** add support for binary request streaming ([ea509da](https://github.com/beeper/desktop-api-python/commit/ea509daa15ef0e9dcf0b08d379c97dff1b1fd4eb))


### Bug Fixes

* **client:** close streams without requiring full consumption ([5449667](https://github.com/beeper/desktop-api-python/commit/544966767cb709bb67daf01b3e01fc0a1f5b78c8))
* compat with Python 3.14 ([ed03f21](https://github.com/beeper/desktop-api-python/commit/ed03f2168fe6f88ecc7068c8914065784d11561c))
* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([e185aed](https://github.com/beeper/desktop-api-python/commit/e185aede9d368ba424a73e42e19eafb7ba581222))
* ensure streams are always closed ([3a660be](https://github.com/beeper/desktop-api-python/commit/3a660be67436ef4e2227ed905682c0162fa4ee01))
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([9a11f98](https://github.com/beeper/desktop-api-python/commit/9a11f98105b307afcdf27d44a17749908596642c))
* use async_to_httpx_files in patch method ([f37e9db](https://github.com/beeper/desktop-api-python/commit/f37e9db5b52f983f0931cd23182bc4083d135497))


### Chores

* add missing docstrings ([ec4dacb](https://github.com/beeper/desktop-api-python/commit/ec4dacbba523fe8d8c7aa55441f2950de1748f3d))
* add Python 3.14 classifier and testing ([e735dc0](https://github.com/beeper/desktop-api-python/commit/e735dc09e604866003b0dc0acf76c10a1d580f51))
* **ci:** upgrade `actions/github-script` ([c428c2e](https://github.com/beeper/desktop-api-python/commit/c428c2ea4c7abda5a7ba79e5961183c59a4ef2c5))
* configure new SDK language ([df55111](https://github.com/beeper/desktop-api-python/commit/df551116f6eab14028e30d0974b9157a4ed9543d))
* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([1963ec3](https://github.com/beeper/desktop-api-python/commit/1963ec35e4a9b5aba1dae3533898bad4e8979fb0))
* **docs:** use environment variables for authentication in code snippets ([b8c7ffb](https://github.com/beeper/desktop-api-python/commit/b8c7ffb4b13386fd98afe0ad77ca210320cf3c4b))
* **internal/tests:** avoid race condition with implicit client cleanup ([3b3c246](https://github.com/beeper/desktop-api-python/commit/3b3c24628854e4fea29e0594ef5ecc31f9444c02))
* **internal:** add `--fix` argument to lint script ([d958469](https://github.com/beeper/desktop-api-python/commit/d95846930fdee434c6aa1f694c84d22e9ec4ea41))
* **internal:** add missing files argument to base client ([85e06b8](https://github.com/beeper/desktop-api-python/commit/85e06b8d715968ffbfaf158ef0e56d468f55bbaa))
* **internal:** codegen related update ([be5fb2d](https://github.com/beeper/desktop-api-python/commit/be5fb2d9cad77879a2216b770e7bf25ddbe3b778))
* **internal:** grammar fix (it's -> its) ([9dd17e2](https://github.com/beeper/desktop-api-python/commit/9dd17e2b322aedd17dc0cd2e5cc78a1ac38ae53a))
* **internal:** update `actions/checkout` version ([d82497d](https://github.com/beeper/desktop-api-python/commit/d82497d40140d08bc2659ef70b1e76e237fb1fa6))
* **package:** drop Python 3.8 support ([3926021](https://github.com/beeper/desktop-api-python/commit/3926021bbdb4c56732364e1b4dc065ec47cf85c0))
* speedup initial import ([78578a1](https://github.com/beeper/desktop-api-python/commit/78578a1910a2cb82650410d82fc9ab6e5099b5e3))
* update lockfile ([366d69a](https://github.com/beeper/desktop-api-python/commit/366d69acd5e42fb975fa2d72002285a6ab76d990))


### Documentation

* prominently feature MCP server setup in root SDK readmes ([cc7035b](https://github.com/beeper/desktop-api-python/commit/cc7035ba857eca0b63dc3c169a43172fe5e2e437))

## 4.1.296 (2025-10-18)

Full Changelog: [v4.1.295...v4.1.296](https://github.com/beeper/desktop-api-python/compare/v4.1.295...v4.1.296)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2025 beeperdesktop
Copyright 2026 beeperdesktop

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- prettier-ignore -->
[![PyPI version](https://img.shields.io/pypi/v/beeper_desktop_api.svg?label=pypi%20(stable))](https://pypi.org/project/beeper_desktop_api/)

The Beeper Desktop Python library provides convenient access to the Beeper Desktop REST API from any Python 3.8+
The Beeper Desktop Python library provides convenient access to the Beeper Desktop REST API from any Python 3.9+
application. The library includes type definitions for all request params and response fields,
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

Expand All @@ -14,10 +14,13 @@ The REST API documentation can be found on [developers.beeper.com](https://devel
## Installation

```sh
# install from PyPI
pip install beeper_desktop_api
# install from the production repo
pip install git+ssh://git@github.com/beeper/desktop-api-python.git
```

> [!NOTE]
> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install beeper_desktop_api`

## Usage

The full API of this library can be found in [api.md](api.md).
Expand Down Expand Up @@ -78,21 +81,24 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv
You can enable this by installing `aiohttp`:

```sh
# install from PyPI
pip install beeper_desktop_api[aiohttp]
# install from the production repo
pip install 'beeper_desktop_api[aiohttp] @ git+ssh://git@github.com/beeper/desktop-api-python.git'
```

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

```python
import os
import asyncio
from beeper_desktop_api import DefaultAioHttpClient
from beeper_desktop_api import AsyncBeeperDesktop


async def main() -> None:
async with AsyncBeeperDesktop(
access_token="My Access Token",
access_token=os.environ.get(
"BEEPER_ACCESS_TOKEN"
), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
page = await client.chats.search(
Expand Down Expand Up @@ -209,6 +215,23 @@ client.chats.reminders.create(
)
```

## File uploads

Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.

```python
from pathlib import Path
from beeper_desktop_api import BeeperDesktop

client = BeeperDesktop()

client.assets.upload(
file=Path("/path/to/file"),
)
```

The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.

## Handling errors

When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `beeper_desktop_api.APIConnectionError` is raised.
Expand Down Expand Up @@ -460,7 +483,7 @@ print(beeper_desktop_api.__version__)

## Requirements

Python 3.8 or higher.
Python 3.9 or higher.

## Contributing

Expand Down
11 changes: 9 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ Methods:
Types:

```python
from beeper_desktop_api.types import MessageSendResponse
from beeper_desktop_api.types import MessageUpdateResponse, MessageSendResponse
```

Methods:

- <code title="put /v1/chats/{chatID}/messages/{messageID}">client.messages.<a href="./src/beeper_desktop_api/resources/messages.py">update</a>(message_id, \*, chat_id, \*\*<a href="src/beeper_desktop_api/types/message_update_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/message_update_response.py">MessageUpdateResponse</a></code>
- <code title="get /v1/chats/{chatID}/messages">client.messages.<a href="./src/beeper_desktop_api/resources/messages.py">list</a>(chat_id, \*\*<a href="src/beeper_desktop_api/types/message_list_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/shared/message.py">SyncCursorSortKey[Message]</a></code>
- <code title="get /v1/messages/search">client.messages.<a href="./src/beeper_desktop_api/resources/messages.py">search</a>(\*\*<a href="src/beeper_desktop_api/types/message_search_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/shared/message.py">SyncCursorSearch[Message]</a></code>
- <code title="post /v1/chats/{chatID}/messages">client.messages.<a href="./src/beeper_desktop_api/resources/messages.py">send</a>(chat_id, \*\*<a href="src/beeper_desktop_api/types/message_send_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/message_send_response.py">MessageSendResponse</a></code>
Expand All @@ -83,9 +84,15 @@ Methods:
Types:

```python
from beeper_desktop_api.types import AssetDownloadResponse
from beeper_desktop_api.types import (
AssetDownloadResponse,
AssetUploadResponse,
AssetUploadBase64Response,
)
```

Methods:

- <code title="post /v1/assets/download">client.assets.<a href="./src/beeper_desktop_api/resources/assets.py">download</a>(\*\*<a href="src/beeper_desktop_api/types/asset_download_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/asset_download_response.py">AssetDownloadResponse</a></code>
- <code title="post /v1/assets/upload">client.assets.<a href="./src/beeper_desktop_api/resources/assets.py">upload</a>(\*\*<a href="src/beeper_desktop_api/types/asset_upload_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/asset_upload_response.py">AssetUploadResponse</a></code>
- <code title="post /v1/assets/upload/base64">client.assets.<a href="./src/beeper_desktop_api/resources/assets.py">upload_base64</a>(\*\*<a href="src/beeper_desktop_api/types/asset_upload_base64_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/asset_upload_base64_response.py">AssetUploadBase64Response</a></code>
24 changes: 13 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
[project]
name = "beeper_desktop_api"
version = "4.1.296"
version = "4.2.0"
description = "The official Python library for the beeperdesktop API"
dynamic = ["readme"]
license = "MIT"
authors = [
{ name = "Beeper Desktop", email = "help@beeper.com" },
]

dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
]
requires-python = ">= 3.8"

requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand All @@ -46,7 +48,7 @@ managed = true
# version pins are in requirements-dev.lock
dev-dependencies = [
"pyright==1.1.399",
"mypy",
"mypy==1.17",
"respx",
"pytest",
"pytest-asyncio",
Expand Down Expand Up @@ -141,7 +143,7 @@ filterwarnings = [
# there are a couple of flags that are still disabled by
# default in strict mode as they are experimental and niche.
typeCheckingMode = "strict"
pythonVersion = "3.8"
pythonVersion = "3.9"

exclude = [
"_dev",
Expand Down
Loading