Skip to content

Commit e60a9e7

Browse files
committed
Release 0.0.34
1 parent 6a6f2b7 commit e60a9e7

104 files changed

Lines changed: 3361 additions & 5157 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: ci
33
on: [push]
44
jobs:
55
compile:
6-
runs-on: ubuntu-latest
6+
runs-on: ubuntu-20.04
77
steps:
88
- name: Checkout repo
9-
uses: actions/checkout@v4
9+
uses: actions/checkout@v3
1010
- name: Set up python
1111
uses: actions/setup-python@v4
1212
with:
@@ -19,10 +19,10 @@ jobs:
1919
- name: Compile
2020
run: poetry run mypy .
2121
test:
22-
runs-on: ubuntu-latest
22+
runs-on: ubuntu-20.04
2323
steps:
2424
- name: Checkout repo
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v3
2626
- name: Set up python
2727
uses: actions/setup-python@v4
2828
with:
@@ -39,10 +39,10 @@ jobs:
3939
publish:
4040
needs: [compile, test]
4141
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
42-
runs-on: ubuntu-latest
42+
runs-on: ubuntu-20.04
4343
steps:
4444
- name: Checkout repo
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v3
4646
- name: Set up python
4747
uses: actions/setup-python@v4
4848
with:

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
dist/
12
.mypy_cache/
2-
.ruff_cache/
33
__pycache__/
4-
dist/
54
poetry.toml
5+
.ruff_cache/

README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ Instantiate and use the client with the following:
2121

2222
```python
2323
from agentmail import AgentMail
24-
client = AgentMail(api_key="YOUR_API_KEY", )
24+
25+
client = AgentMail(
26+
api_key="YOUR_API_KEY",
27+
)
2528
client.inboxes.create()
2629
```
2730

@@ -30,11 +33,19 @@ client.inboxes.create()
3033
The SDK also exports an `async` client so that you can make non-blocking calls to our API.
3134

3235
```python
33-
from agentmail import AsyncAgentMail
3436
import asyncio
35-
client = AsyncAgentMail(api_key="YOUR_API_KEY", )
37+
38+
from agentmail import AsyncAgentMail
39+
40+
client = AsyncAgentMail(
41+
api_key="YOUR_API_KEY",
42+
)
43+
44+
3645
async def main() -> None:
3746
await client.inboxes.create()
47+
48+
3849
asyncio.run(main())
3950
```
4051

@@ -45,6 +56,7 @@ will be thrown.
4556

4657
```python
4758
from agentmail.core.api_error import ApiError
59+
4860
try:
4961
client.inboxes.create(...)
5062
except ApiError as e:
@@ -54,19 +66,6 @@ except ApiError as e:
5466

5567
## Advanced
5668

57-
### Access Raw Response Data
58-
59-
The SDK provides access to raw response data, including headers, through the `.with_raw_response` property.
60-
The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes.
61-
62-
```python
63-
from agentmail import AgentMail
64-
client = AgentMail(..., )
65-
response = client.inboxes.with_raw_response.create(...)
66-
print(response.headers) # access the response headers
67-
print(response.data) # access the underlying object
68-
```
69-
7069
### Retries
7170

7271
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
@@ -94,7 +93,12 @@ The SDK defaults to a 60 second timeout. You can configure this with a timeout o
9493
```python
9594

9695
from agentmail import AgentMail
97-
client = AgentMail(..., timeout=20.0, )
96+
97+
client = AgentMail(
98+
...,
99+
timeout=20.0,
100+
)
101+
98102

99103
# Override timeout for a specific method
100104
client.inboxes.create(..., request_options={
@@ -106,11 +110,18 @@ client.inboxes.create(..., request_options={
106110

107111
You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
108112
and transports.
109-
110113
```python
111-
from agentmail import AgentMail
112114
import httpx
113-
client = AgentMail(..., httpx_client=httpx.Client(proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0"), ))```
115+
from agentmail import AgentMail
116+
117+
client = AgentMail(
118+
...,
119+
httpx_client=httpx.Client(
120+
proxies="http://my.test.proxy.example.com",
121+
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
122+
),
123+
)
124+
```
114125

115126
## Contributing
116127

poetry.lock

Lines changed: 51 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "agentmail"
33

44
[tool.poetry]
55
name = "agentmail"
6-
version = "0.0.33"
6+
version = "0.0.34"
77
description = ""
88
readme = "README.md"
99
authors = []
@@ -40,13 +40,13 @@ pydantic = ">= 1.9.2"
4040
pydantic-core = "^2.18.2"
4141
typing_extensions = ">= 4.0.0"
4242

43-
[tool.poetry.group.dev.dependencies]
44-
mypy = "==1.13.0"
43+
[tool.poetry.dev-dependencies]
44+
mypy = "1.0.1"
4545
pytest = "^7.4.0"
4646
pytest-asyncio = "^0.23.5"
4747
python-dateutil = "^2.9.0"
4848
types-python-dateutil = "^2.9.0.20240316"
49-
ruff = "==0.11.5"
49+
ruff = "^0.5.6"
5050

5151
[tool.pytest.ini_options]
5252
testpaths = [ "tests" ]
@@ -58,26 +58,6 @@ plugins = ["pydantic.mypy"]
5858
[tool.ruff]
5959
line-length = 120
6060

61-
[tool.ruff.lint]
62-
select = [
63-
"E", # pycodestyle errors
64-
"F", # pyflakes
65-
"I", # isort
66-
]
67-
ignore = [
68-
"E402", # Module level import not at top of file
69-
"E501", # Line too long
70-
"E711", # Comparison to `None` should be `cond is not None`
71-
"E712", # Avoid equality comparisons to `True`; use `if ...:` checks
72-
"E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks
73-
"E722", # Do not use bare `except`
74-
"E731", # Do not assign a `lambda` expression, use a `def`
75-
"F821", # Undefined name
76-
"F841" # Local variable ... is assigned to but never used
77-
]
78-
79-
[tool.ruff.lint.isort]
80-
section-order = ["future", "standard-library", "third-party", "first-party"]
8161

8262
[build-system]
8363
requires = ["poetry-core"]

0 commit comments

Comments
 (0)