Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cliVersion": "3.31.1",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.38.4",
"generatorConfig": {
"client_class_name": "Merge",
"inline_request_params": false,
"improved_imports": false,
"pydantic_config": {
"skip_validation": true,
"enum_type": "python_enums",
"use_pydantic_field_aliases": true
}
}
}
3 changes: 2 additions & 1 deletion .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ LICENSE.md
src/merge/resources/accounting/types/currency_enum.py

tests/integration/test_filestorage.py
tests/integration/test_knowledgebase.py
tests/integration/test_knowledgebase.py
changelog.md
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ client = Merge(
api_key="YOUR_API_KEY",
)
client.ats.activities.create(
is_debug_mode=True,
run_async=True,
model=ActivityRequest(),
remote_user_id="remote_user_id",
)
Expand Down Expand Up @@ -83,7 +81,7 @@ client.hris. # APIs specific to the HRIS Category

## Async Client

The SDK also exports an `async` client so that you can make non-blocking calls to our API.
The SDK also exports an `async` client so that you can make non-blocking calls to our API. Note that if you are constructing an Async httpx client class to pass into this client, use `httpx.AsyncClient()` instead of `httpx.Client()` (e.g. for the `httpx_client` parameter of this client).

```python
import asyncio
Expand All @@ -99,8 +97,6 @@ client = AsyncMerge(

async def main() -> None:
await client.ats.activities.create(
is_debug_mode=True,
run_async=True,
model=ActivityRequest(),
remote_user_id="remote_user_id",
)
Expand Down Expand Up @@ -140,6 +136,14 @@ client = Merge(
response = client.ats.activities.with_raw_response.create(...)
print(response.headers) # access the response headers
print(response.data) # access the underlying object
pager = client.ats.activities.list(...)
print(pager.response) # access the typed response for the first page
for item in pager:
print(item) # access the underlying object(s)
for page in pager.iter_pages():
print(page.response) # access the typed response for each page
for item in page:
print(item) # access the underlying object(s)
```

### Retries
Expand Down Expand Up @@ -233,32 +237,31 @@ with open(local_filename, "wb") as f:

## Pagination

The SDK may return paginated results. Endpoints that return paginated results will
include a `next` and `prev` property on the response. To get the next page, you can
pass in the value of `next` to the cursor property on the request. Similarly, to
get the previous page, you can pass in the value of `prev` to the cursor property on
the request.
Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.

Below is an example of iterating over all pages:
```python
from merge import Merge

# response contains the first page
response = merge_client.hris.employees.list(created_after="2030-01-01")

# if there is a next page, load it by passing `next` to the cursor argument
while response.next is not None:
response = hris_client.employees.list(
cursor=response.next,
created_after="2030-01-01")
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
response = client.ats.activities.list(
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
)
for item in response:
yield item
# alternatively, you can paginate page-by-page
for page in response.iter_pages():
yield page
```










```python
# You can also iterate through pages and access the typed response per page
pager = client.ats.activities.list(...)
for page in pager.iter_pages():
print(page.response) # access the typed response for each page
for item in page:
print(item)
```

4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 2.6.2 - 2026-01-15
* SDK regeneration
* Unable to analyze changes with AI, incrementing PATCH version.

36 changes: 35 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "MergePythonClient"

[tool.poetry]
name = "MergePythonClient"
version = "2.6.1"
version = "2.6.2"
description = ""
readme = "README.md"
authors = []
Expand All @@ -30,7 +30,7 @@ packages = [
{ include = "merge", from = "src"}
]

[project.urls]
[tool.poetry.urls]
Repository = 'https://github.com/merge-api/merge-python-client'

[tool.poetry.dependencies]
Expand All @@ -44,6 +44,7 @@ typing_extensions = ">= 4.0.0"
mypy = "==1.13.0"
pytest = "^7.4.0"
pytest-asyncio = "^0.23.5"
pytest-xdist = "^3.6.1"
python-dateutil = "^2.9.0"
types-python-dateutil = "^2.9.0.20240316"
ruff = "==0.11.5"
Expand Down
Loading
Loading