Skip to content

Commit e6c57b0

Browse files
authored
Merge pull request #17 from ArkHQ-io/release-please--branches--main--changes--next
release: 0.14.0
2 parents 1c3b946 + 526997e commit e6c57b0

28 files changed

Lines changed: 785 additions & 80 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.13.0"
2+
".": "0.14.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 34
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/ark%2Fark-b651c88f3a87cebd528784fef019612f41517d0912c7e5695bb4419d00b9409b.yml
3-
openapi_spec_hash: 33d0f5c2bb0349abf085404e2a3b05f7
4-
config_hash: fbd4e7a9ee50aad316893984a725519b
1+
configured_endpoints: 35
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/ark%2Fark-1949bcfc8775c97eca880428dc93e9f97aa91144bef82584027ede5089bb2e19.yml
3+
openapi_spec_hash: 0aa367455a067b701f18ef7892b6c7e9
4+
config_hash: 373e654f8034a40c42234eee9ebefbb9

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 0.14.0 (2026-01-29)
4+
5+
Full Changelog: [v0.13.0...v0.14.0](https://github.com/ArkHQ-io/ark-python/compare/v0.13.0...v0.14.0)
6+
7+
### Features
8+
9+
* **api:** add usage and SendLimit Headers ([4281980](https://github.com/ArkHQ-io/ark-python/commit/4281980353ff7423dbc6627e37abefee952bc489))
10+
* **api:** api update ([10f496a](https://github.com/ArkHQ-io/ark-python/commit/10f496a29924ecd9bcc93d0551ea8bd29662aa89))
11+
* **api:** domain list improvement ([6929689](https://github.com/ArkHQ-io/ark-python/commit/69296893c13ad8e4f05047f312009e88a8f02830))
12+
13+
14+
### Bug Fixes
15+
16+
* **docs:** fix mcp installation instructions for remote servers ([f559107](https://github.com/ArkHQ-io/ark-python/commit/f55910772f06f551b98a1ddc7c7dda45fc2176f4))
17+
318
## 0.13.0 (2026-01-25)
419

520
Full Changelog: [v0.12.0...v0.13.0](https://github.com/ArkHQ-io/ark-python/compare/v0.12.0...v0.13.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ It is generated with [Stainless](https://www.stainless.com/).
1313

1414
Use the Ark MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
1515

16-
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=ark-email-mcp&config=eyJuYW1lIjoiYXJrLWVtYWlsLW1jcCIsInRyYW5zcG9ydCI6InNzZSIsInVybCI6Imh0dHBzOi8vYXJrLW1jcC5zdGxtY3AuY29tL3NzZSJ9)
17-
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22ark-email-mcp%22%2C%22type%22%3A%22sse%22%2C%22url%22%3A%22https%3A%2F%2Fark-mcp.stlmcp.com%2Fsse%22%7D)
16+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=ark-email-mcp&config=eyJuYW1lIjoiYXJrLWVtYWlsLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2Fyay1tY3Auc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1hcmstYXBpLWtleSI6Ik15IEFQSSBLZXkifX0)
17+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22ark-email-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fark-mcp.stlmcp.com%22%2C%22headers%22%3A%7B%22x-ark-api-key%22%3A%22My%20API%20Key%22%7D%7D)
1818

1919
> Note: You may need to set environment variables in your MCP client.
2020

api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,15 @@ Methods:
142142

143143
- <code title="get /logs/{requestId}">client.logs.<a href="./src/ark/resources/logs.py">retrieve</a>(request_id) -> <a href="./src/ark/types/log_retrieve_response.py">LogRetrieveResponse</a></code>
144144
- <code title="get /logs">client.logs.<a href="./src/ark/resources/logs.py">list</a>(\*\*<a href="src/ark/types/log_list_params.py">params</a>) -> <a href="./src/ark/types/log_entry.py">SyncPageNumberPagination[LogEntry]</a></code>
145+
146+
# Usage
147+
148+
Types:
149+
150+
```python
151+
from ark.types import UsageRetrieveResponse
152+
```
153+
154+
Methods:
155+
156+
- <code title="get /usage">client.usage.<a href="./src/ark/resources/usage.py">retrieve</a>() -> <a href="./src/ark/types/usage_retrieve_response.py">UsageRetrieveResponse</a></code>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ark-email"
3-
version = "0.13.0"
3+
version = "0.14.0"
44
description = "The official Python library for the ark API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/ark/_client.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
)
3232

3333
if TYPE_CHECKING:
34-
from .resources import logs, emails, domains, tracking, webhooks, suppressions
34+
from .resources import logs, usage, emails, domains, tracking, webhooks, suppressions
3535
from .resources.logs import LogsResource, AsyncLogsResource
36+
from .resources.usage import UsageResource, AsyncUsageResource
3637
from .resources.emails import EmailsResource, AsyncEmailsResource
3738
from .resources.domains import DomainsResource, AsyncDomainsResource
3839
from .resources.tracking import TrackingResource, AsyncTrackingResource
@@ -133,6 +134,12 @@ def logs(self) -> LogsResource:
133134

134135
return LogsResource(self)
135136

137+
@cached_property
138+
def usage(self) -> UsageResource:
139+
from .resources.usage import UsageResource
140+
141+
return UsageResource(self)
142+
136143
@cached_property
137144
def with_raw_response(self) -> ArkWithRawResponse:
138145
return ArkWithRawResponse(self)
@@ -337,6 +344,12 @@ def logs(self) -> AsyncLogsResource:
337344

338345
return AsyncLogsResource(self)
339346

347+
@cached_property
348+
def usage(self) -> AsyncUsageResource:
349+
from .resources.usage import AsyncUsageResource
350+
351+
return AsyncUsageResource(self)
352+
340353
@cached_property
341354
def with_raw_response(self) -> AsyncArkWithRawResponse:
342355
return AsyncArkWithRawResponse(self)
@@ -492,6 +505,12 @@ def logs(self) -> logs.LogsResourceWithRawResponse:
492505

493506
return LogsResourceWithRawResponse(self._client.logs)
494507

508+
@cached_property
509+
def usage(self) -> usage.UsageResourceWithRawResponse:
510+
from .resources.usage import UsageResourceWithRawResponse
511+
512+
return UsageResourceWithRawResponse(self._client.usage)
513+
495514

496515
class AsyncArkWithRawResponse:
497516
_client: AsyncArk
@@ -535,6 +554,12 @@ def logs(self) -> logs.AsyncLogsResourceWithRawResponse:
535554

536555
return AsyncLogsResourceWithRawResponse(self._client.logs)
537556

557+
@cached_property
558+
def usage(self) -> usage.AsyncUsageResourceWithRawResponse:
559+
from .resources.usage import AsyncUsageResourceWithRawResponse
560+
561+
return AsyncUsageResourceWithRawResponse(self._client.usage)
562+
538563

539564
class ArkWithStreamedResponse:
540565
_client: Ark
@@ -578,6 +603,12 @@ def logs(self) -> logs.LogsResourceWithStreamingResponse:
578603

579604
return LogsResourceWithStreamingResponse(self._client.logs)
580605

606+
@cached_property
607+
def usage(self) -> usage.UsageResourceWithStreamingResponse:
608+
from .resources.usage import UsageResourceWithStreamingResponse
609+
610+
return UsageResourceWithStreamingResponse(self._client.usage)
611+
581612

582613
class AsyncArkWithStreamedResponse:
583614
_client: AsyncArk
@@ -621,6 +652,12 @@ def logs(self) -> logs.AsyncLogsResourceWithStreamingResponse:
621652

622653
return AsyncLogsResourceWithStreamingResponse(self._client.logs)
623654

655+
@cached_property
656+
def usage(self) -> usage.AsyncUsageResourceWithStreamingResponse:
657+
from .resources.usage import AsyncUsageResourceWithStreamingResponse
658+
659+
return AsyncUsageResourceWithStreamingResponse(self._client.usage)
660+
624661

625662
Client = Ark
626663

src/ark/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "ark"
4-
__version__ = "0.13.0" # x-release-please-version
4+
__version__ = "0.14.0" # x-release-please-version

src/ark/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
LogsResourceWithStreamingResponse,
99
AsyncLogsResourceWithStreamingResponse,
1010
)
11+
from .usage import (
12+
UsageResource,
13+
AsyncUsageResource,
14+
UsageResourceWithRawResponse,
15+
AsyncUsageResourceWithRawResponse,
16+
UsageResourceWithStreamingResponse,
17+
AsyncUsageResourceWithStreamingResponse,
18+
)
1119
from .emails import (
1220
EmailsResource,
1321
AsyncEmailsResource,
@@ -86,4 +94,10 @@
8694
"AsyncLogsResourceWithRawResponse",
8795
"LogsResourceWithStreamingResponse",
8896
"AsyncLogsResourceWithStreamingResponse",
97+
"UsageResource",
98+
"AsyncUsageResource",
99+
"UsageResourceWithRawResponse",
100+
"AsyncUsageResourceWithRawResponse",
101+
"UsageResourceWithStreamingResponse",
102+
"AsyncUsageResourceWithStreamingResponse",
89103
]

src/ark/resources/usage.py

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
import httpx
6+
7+
from .._types import Body, Query, Headers, NotGiven, not_given
8+
from .._compat import cached_property
9+
from .._resource import SyncAPIResource, AsyncAPIResource
10+
from .._response import (
11+
to_raw_response_wrapper,
12+
to_streamed_response_wrapper,
13+
async_to_raw_response_wrapper,
14+
async_to_streamed_response_wrapper,
15+
)
16+
from .._base_client import make_request_options
17+
from ..types.usage_retrieve_response import UsageRetrieveResponse
18+
19+
__all__ = ["UsageResource", "AsyncUsageResource"]
20+
21+
22+
class UsageResource(SyncAPIResource):
23+
@cached_property
24+
def with_raw_response(self) -> UsageResourceWithRawResponse:
25+
"""
26+
This property can be used as a prefix for any HTTP method call to return
27+
the raw response object instead of the parsed content.
28+
29+
For more information, see https://www.github.com/ArkHQ-io/ark-python#accessing-raw-response-data-eg-headers
30+
"""
31+
return UsageResourceWithRawResponse(self)
32+
33+
@cached_property
34+
def with_streaming_response(self) -> UsageResourceWithStreamingResponse:
35+
"""
36+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
37+
38+
For more information, see https://www.github.com/ArkHQ-io/ark-python#with_streaming_response
39+
"""
40+
return UsageResourceWithStreamingResponse(self)
41+
42+
def retrieve(
43+
self,
44+
*,
45+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
46+
# The extra values given here take precedence over values defined on the client or passed to this method.
47+
extra_headers: Headers | None = None,
48+
extra_query: Query | None = None,
49+
extra_body: Body | None = None,
50+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
51+
) -> UsageRetrieveResponse:
52+
"""
53+
Returns current usage and limit information for your account.
54+
55+
This endpoint is designed for:
56+
57+
- **AI agents/MCP servers:** Check constraints before planning batch operations
58+
- **Monitoring dashboards:** Display current usage status
59+
- **Rate limit awareness:** Know remaining capacity before making requests
60+
61+
**Response includes:**
62+
63+
- `rateLimit` - API request rate limit (requests per second)
64+
- `sendLimit` - Email sending limit (emails per hour)
65+
- `billing` - Credit balance and auto-recharge configuration
66+
67+
**Notes:**
68+
69+
- This request counts against your rate limit
70+
- `sendLimit` may be null if Postal is temporarily unavailable
71+
- `billing` is null if billing is not configured
72+
- Send limit resets at the top of each hour
73+
"""
74+
return self._get(
75+
"/usage",
76+
options=make_request_options(
77+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
78+
),
79+
cast_to=UsageRetrieveResponse,
80+
)
81+
82+
83+
class AsyncUsageResource(AsyncAPIResource):
84+
@cached_property
85+
def with_raw_response(self) -> AsyncUsageResourceWithRawResponse:
86+
"""
87+
This property can be used as a prefix for any HTTP method call to return
88+
the raw response object instead of the parsed content.
89+
90+
For more information, see https://www.github.com/ArkHQ-io/ark-python#accessing-raw-response-data-eg-headers
91+
"""
92+
return AsyncUsageResourceWithRawResponse(self)
93+
94+
@cached_property
95+
def with_streaming_response(self) -> AsyncUsageResourceWithStreamingResponse:
96+
"""
97+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
98+
99+
For more information, see https://www.github.com/ArkHQ-io/ark-python#with_streaming_response
100+
"""
101+
return AsyncUsageResourceWithStreamingResponse(self)
102+
103+
async def retrieve(
104+
self,
105+
*,
106+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
107+
# The extra values given here take precedence over values defined on the client or passed to this method.
108+
extra_headers: Headers | None = None,
109+
extra_query: Query | None = None,
110+
extra_body: Body | None = None,
111+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
112+
) -> UsageRetrieveResponse:
113+
"""
114+
Returns current usage and limit information for your account.
115+
116+
This endpoint is designed for:
117+
118+
- **AI agents/MCP servers:** Check constraints before planning batch operations
119+
- **Monitoring dashboards:** Display current usage status
120+
- **Rate limit awareness:** Know remaining capacity before making requests
121+
122+
**Response includes:**
123+
124+
- `rateLimit` - API request rate limit (requests per second)
125+
- `sendLimit` - Email sending limit (emails per hour)
126+
- `billing` - Credit balance and auto-recharge configuration
127+
128+
**Notes:**
129+
130+
- This request counts against your rate limit
131+
- `sendLimit` may be null if Postal is temporarily unavailable
132+
- `billing` is null if billing is not configured
133+
- Send limit resets at the top of each hour
134+
"""
135+
return await self._get(
136+
"/usage",
137+
options=make_request_options(
138+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
139+
),
140+
cast_to=UsageRetrieveResponse,
141+
)
142+
143+
144+
class UsageResourceWithRawResponse:
145+
def __init__(self, usage: UsageResource) -> None:
146+
self._usage = usage
147+
148+
self.retrieve = to_raw_response_wrapper(
149+
usage.retrieve,
150+
)
151+
152+
153+
class AsyncUsageResourceWithRawResponse:
154+
def __init__(self, usage: AsyncUsageResource) -> None:
155+
self._usage = usage
156+
157+
self.retrieve = async_to_raw_response_wrapper(
158+
usage.retrieve,
159+
)
160+
161+
162+
class UsageResourceWithStreamingResponse:
163+
def __init__(self, usage: UsageResource) -> None:
164+
self._usage = usage
165+
166+
self.retrieve = to_streamed_response_wrapper(
167+
usage.retrieve,
168+
)
169+
170+
171+
class AsyncUsageResourceWithStreamingResponse:
172+
def __init__(self, usage: AsyncUsageResource) -> None:
173+
self._usage = usage
174+
175+
self.retrieve = async_to_streamed_response_wrapper(
176+
usage.retrieve,
177+
)

0 commit comments

Comments
 (0)