Skip to content

Commit ef1ba61

Browse files
committed
Release 0.1.3
1 parent 40c265c commit ef1ba61

File tree

3 files changed

+5
-37
lines changed

3 files changed

+5
-37
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ from fileforge.client import Fileforge
2222

2323
client = Fileforge(
2424
api_key="YOUR_API_KEY",
25-
api_key="YOUR_API_KEY",
2625
)
2726
```
2827
<!-- End Usage -->
@@ -35,7 +34,6 @@ from fileforge.client import AsyncFileforge
3534

3635
client = AsyncFileforge(
3736
api_key="YOUR_API_KEY",
38-
api_key="YOUR_API_KEY",
3937
)
4038
```
4139
<!-- End Async Usage -->

src/fileforge/client.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class Fileforge:
4646
4747
4848
49-
api_key : str
5049
api_key : str
5150
timeout : typing.Optional[float]
5251
The timeout to be used, in seconds, for requests by default the timeout is 60 seconds, unless a custom httpx client is used, in which case a default is not set.
@@ -63,7 +62,6 @@ class Fileforge:
6362
6463
client = Fileforge(
6564
api_key="YOUR_API_KEY",
66-
api_key="YOUR_API_KEY",
6765
)
6866
"""
6967

@@ -73,7 +71,6 @@ def __init__(
7371
base_url: typing.Optional[str] = None,
7472
environment: FileforgeEnvironment = FileforgeEnvironment.DEFAULT,
7573
api_key: str,
76-
api_key: str,
7774
timeout: typing.Optional[float] = None,
7875
follow_redirects: typing.Optional[bool] = True,
7976
httpx_client: typing.Optional[httpx.Client] = None,
@@ -82,7 +79,6 @@ def __init__(
8279
self._client_wrapper = SyncClientWrapper(
8380
base_url=_get_base_url(base_url=base_url, environment=environment),
8481
api_key=api_key,
85-
api_key=api_key,
8682
httpx_client=httpx_client
8783
if httpx_client is not None
8884
else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
@@ -108,7 +104,6 @@ def retrieve_server_status(self, *, request_options: typing.Optional[RequestOpti
108104
109105
client = Fileforge(
110106
api_key="YOUR_API_KEY",
111-
api_key="YOUR_API_KEY",
112107
)
113108
client.retrieve_server_status()
114109
"""
@@ -212,7 +207,6 @@ def convert_docx(
212207
213208
client = Fileforge(
214209
api_key="YOUR_API_KEY",
215-
api_key="YOUR_API_KEY",
216210
)
217211
client.convert_docx()
218212
"""
@@ -294,7 +288,6 @@ def generate(
294288
295289
client = Fileforge(
296290
api_key="YOUR_API_KEY",
297-
api_key="YOUR_API_KEY",
298291
)
299292
client.generate()
300293
"""
@@ -375,7 +368,6 @@ def merge(
375368
376369
client = Fileforge(
377370
api_key="YOUR_API_KEY",
378-
api_key="YOUR_API_KEY",
379371
)
380372
client.merge()
381373
"""
@@ -444,7 +436,6 @@ class AsyncFileforge:
444436
445437
446438
447-
api_key : str
448439
api_key : str
449440
timeout : typing.Optional[float]
450441
The timeout to be used, in seconds, for requests by default the timeout is 60 seconds, unless a custom httpx client is used, in which case a default is not set.
@@ -461,7 +452,6 @@ class AsyncFileforge:
461452
462453
client = AsyncFileforge(
463454
api_key="YOUR_API_KEY",
464-
api_key="YOUR_API_KEY",
465455
)
466456
"""
467457

@@ -471,7 +461,6 @@ def __init__(
471461
base_url: typing.Optional[str] = None,
472462
environment: FileforgeEnvironment = FileforgeEnvironment.DEFAULT,
473463
api_key: str,
474-
api_key: str,
475464
timeout: typing.Optional[float] = None,
476465
follow_redirects: typing.Optional[bool] = True,
477466
httpx_client: typing.Optional[httpx.AsyncClient] = None,
@@ -480,7 +469,6 @@ def __init__(
480469
self._client_wrapper = AsyncClientWrapper(
481470
base_url=_get_base_url(base_url=base_url, environment=environment),
482471
api_key=api_key,
483-
api_key=api_key,
484472
httpx_client=httpx_client
485473
if httpx_client is not None
486474
else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
@@ -506,7 +494,6 @@ async def retrieve_server_status(self, *, request_options: typing.Optional[Reque
506494
507495
client = AsyncFileforge(
508496
api_key="YOUR_API_KEY",
509-
api_key="YOUR_API_KEY",
510497
)
511498
await client.retrieve_server_status()
512499
"""
@@ -610,7 +597,6 @@ async def convert_docx(
610597
611598
client = AsyncFileforge(
612599
api_key="YOUR_API_KEY",
613-
api_key="YOUR_API_KEY",
614600
)
615601
await client.convert_docx()
616602
"""
@@ -692,7 +678,6 @@ async def generate(
692678
693679
client = AsyncFileforge(
694680
api_key="YOUR_API_KEY",
695-
api_key="YOUR_API_KEY",
696681
)
697682
await client.generate()
698683
"""
@@ -773,7 +758,6 @@ async def merge(
773758
774759
client = AsyncFileforge(
775760
api_key="YOUR_API_KEY",
776-
api_key="YOUR_API_KEY",
777761
)
778762
await client.merge()
779763
"""

src/fileforge/core/client_wrapper.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99

1010
class BaseClientWrapper:
11-
def __init__(self, *, api_key: str, api_key: str, base_url: str, timeout: typing.Optional[float] = None):
12-
self._api_key = api_key
11+
def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None):
1312
self.api_key = api_key
1413
self._base_url = base_url
1514
self._timeout = timeout
@@ -20,7 +19,6 @@ def get_headers(self) -> typing.Dict[str, str]:
2019
"X-Fern-SDK-Name": "fileforge",
2120
"X-Fern-SDK-Version": "0.1.3",
2221
}
23-
headers["X-API-Key"] = self._api_key
2422
headers["X-API-Key"] = self.api_key
2523
return headers
2624

@@ -33,27 +31,15 @@ def get_timeout(self) -> typing.Optional[float]:
3331

3432
class SyncClientWrapper(BaseClientWrapper):
3533
def __init__(
36-
self,
37-
*,
38-
api_key: str,
39-
api_key: str,
40-
base_url: str,
41-
timeout: typing.Optional[float] = None,
42-
httpx_client: httpx.Client
34+
self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client
4335
):
44-
super().__init__(api_key=api_key, api_key=api_key, base_url=base_url, timeout=timeout)
36+
super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
4537
self.httpx_client = HttpClient(httpx_client=httpx_client)
4638

4739

4840
class AsyncClientWrapper(BaseClientWrapper):
4941
def __init__(
50-
self,
51-
*,
52-
api_key: str,
53-
api_key: str,
54-
base_url: str,
55-
timeout: typing.Optional[float] = None,
56-
httpx_client: httpx.AsyncClient
42+
self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient
5743
):
58-
super().__init__(api_key=api_key, api_key=api_key, base_url=base_url, timeout=timeout)
44+
super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
5945
self.httpx_client = AsyncHttpClient(httpx_client=httpx_client)

0 commit comments

Comments
 (0)