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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 0 additions & 16 deletions .fern/metadata.json

This file was deleted.

8 changes: 7 additions & 1 deletion .fern/replay.lock

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

30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ Instantiate and use the client with the following:
from merge import Merge

client = Merge(
api_key="<token>",
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)

client.ats.account_token.regenerate_create()
```

Expand Down Expand Up @@ -77,15 +77,16 @@ 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. 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).
The SDK also exports an `async` client so that you can make non-blocking calls to our API.

```python
import asyncio

from merge import AsyncMerge

client = AsyncMerge(
api_key="<token>",
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)


Expand All @@ -105,7 +106,7 @@ will be thrown.
from merge.core.api_error import ApiError

try:
client.ats.account_token.regenerate_create()
client.ats.account_token.regenerate_create(...)
except ApiError as e:
print(e.status_code)
print(e.body)
Expand All @@ -121,10 +122,11 @@ The `.with_raw_response` property returns a "raw" client that can be used to acc
```python
from merge import Merge

client = Merge(...)
response = client.ats.account_token.with_raw_response.regenerate_create()
client = Merge(
...,
)
response = client.ats.account_token.with_raw_response.regenerate_create(...)
print(response.headers) # access the response headers
print(response.status_code) # access the response status code
print(response.data) # access the underlying object
```

Expand All @@ -143,7 +145,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
Use the `max_retries` request option to configure this behavior.

```python
client.ats.account_token.regenerate_create(request_options={
client.ats.account_token.regenerate_create(..., request_options={
"max_retries": 1
})
```
Expand All @@ -153,12 +155,17 @@ client.ats.account_token.regenerate_create(request_options={
The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.

```python

from merge import Merge

client = Merge(..., timeout=20.0)
client = Merge(
...,
timeout=20.0,
)


# Override timeout for a specific method
client.ats.account_token.regenerate_create(request_options={
client.ats.account_token.regenerate_create(..., request_options={
"timeout_in_seconds": 1
})
```
Expand Down Expand Up @@ -252,5 +259,6 @@ while response.next is not None:






434 changes: 177 additions & 257 deletions poetry.lock

Large diffs are not rendered by default.

17 changes: 7 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[project]
name = "MergePythonClient"
dynamic = ["version"]

[tool.poetry]
name = "MergePythonClient"
version = "4.0.0"
version = "3.1.1"
description = ""
readme = "README.md"
authors = []
Expand All @@ -14,12 +13,11 @@ classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3.15",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand All @@ -32,21 +30,20 @@ packages = [
{ include = "merge", from = "src"}
]

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

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.8"
httpx = ">=0.21.2"
pydantic = ">= 1.9.2"
pydantic-core = ">=2.18.2"
typing_extensions = ">= 4.0.0"

[tool.poetry.group.dev.dependencies]
mypy = "==1.13.0"
pytest = "^8.2.0"
pytest-asyncio = "^1.0.0"
pytest-xdist = "^3.6.1"
pytest = "^7.4.0"
pytest-asyncio = "^0.23.5"
python-dateutil = "^2.9.0"
types-python-dateutil = "^2.9.0.20240316"
ruff = "==0.11.5"
Expand Down
Loading
Loading