bookalimo 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bookalimo/_client.py CHANGED
@@ -63,9 +63,7 @@ class BookALimoClient:
63
63
  credentials: Credentials,
64
64
  user_agent: str = "bookalimo-python",
65
65
  version: Optional[str] = None,
66
- sandbox: bool = False,
67
66
  base_url: str = "https://api.bookalimo.com",
68
- base_url_sandbox: str = "https://sandbox.bookalimo.com",
69
67
  http_timeout: float = 5.0,
70
68
  ):
71
69
  """Initialize the client with an HTTP client."""
@@ -76,9 +74,7 @@ class BookALimoClient:
76
74
  "content-type": "application/json",
77
75
  "user-agent": f"{user_agent}/{version}",
78
76
  }
79
- self.sandbox = sandbox
80
77
  self.base_url = base_url
81
- self.base_url_sandbox = base_url_sandbox
82
78
  self.http_timeout = http_timeout
83
79
 
84
80
  def _convert_model_to_api_dict(self, data: dict[str, Any]) -> dict[str, Any]:
@@ -175,10 +171,6 @@ class BookALimoClient:
175
171
  result.append(char.lower())
176
172
  return "".join(result)
177
173
 
178
- def get_base_url(self) -> str:
179
- """Get the base URL for the API."""
180
- return self.base_url_sandbox if self.sandbox else self.base_url
181
-
182
174
  async def _make_request(
183
175
  self,
184
176
  endpoint: str,
@@ -201,7 +193,7 @@ class BookALimoClient:
201
193
  Raises:
202
194
  BookALimoError: On API errors or HTTP errors
203
195
  """
204
- url = f"{self.get_base_url()}{endpoint}"
196
+ url = f"{self.base_url}{endpoint}"
205
197
 
206
198
  # Convert model data to API format
207
199
  api_data = self._convert_model_to_api_dict(data.model_dump())
bookalimo/wrapper.py CHANGED
@@ -44,7 +44,8 @@ class BookALimo:
44
44
  self,
45
45
  credentials: Credentials,
46
46
  http_client: Optional[AsyncClient] = None,
47
- sandbox: bool = False,
47
+ base_url: str = "https://api.bookalimo.com",
48
+ http_timeout: float = 5.0,
48
49
  **kwargs: Any,
49
50
  ):
50
51
  """
@@ -52,7 +53,6 @@ class BookALimo:
52
53
 
53
54
  Args:
54
55
  credentials: User ID and password hash for authentication.
55
- sandbox: Set to True to use the sandbox environment.
56
56
  http_client: Optional custom httpx.AsyncClient instance.
57
57
  **kwargs: Additional options passed to the BookALimoClient.
58
58
  """
@@ -60,8 +60,9 @@ class BookALimo:
60
60
  self.http_client = http_client or AsyncClient()
61
61
  self.client = BookALimoClient(
62
62
  credentials=credentials,
63
- sandbox=sandbox,
64
63
  client=self.http_client,
64
+ base_url=base_url,
65
+ http_timeout=http_timeout,
65
66
  **kwargs,
66
67
  )
67
68
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bookalimo
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Python wrapper for the Book-A-Limo API
5
5
  Author-email: Jonathan Oren <jonathan@bookalimo.com>
6
6
  Maintainer-email: Jonathan Oren <jonathan@bookalimo.com>
@@ -127,16 +127,6 @@ if __name__ == "__main__":
127
127
  asyncio.run(main())
128
128
  ```
129
129
 
130
- ### Using the Sandbox
131
-
132
- ```python
133
- async with AsyncClient() as http_client:
134
- async with BookALimo(
135
- credentials, http_client=http_client, sandbox=True
136
- ) as client:
137
- ...
138
- ```
139
-
140
130
  ## Authentication
141
131
 
142
132
  ```python
@@ -320,7 +310,6 @@ mkdocs serve
320
310
 
321
311
  * Never log raw passwords or credit card numbers.
322
312
  * Store credentials securely (e.g., environment variables, secrets managers).
323
- * Use sandbox for testing.
324
313
 
325
314
  ## License
326
315
 
@@ -0,0 +1,10 @@
1
+ bookalimo/__init__.py,sha256=ch1t7uvw_F3zNpqb-IfH0n2sDwFLnAQDgm2lpwtvpj4,568
2
+ bookalimo/_client.py,sha256=H5PYZ3S1OMqaP8kzsZfqyTnvyOwGeg_WsCG2Imb5-98,11498
3
+ bookalimo/models.py,sha256=-gvxrT7llrYLxSHWn3vpmvkQqnk2ejSd97Sw8BxgBLw,16420
4
+ bookalimo/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
5
+ bookalimo/wrapper.py,sha256=zialtJGS7mK7aXHyTIcAQghIDai9W73dbRln0Lz7ndE,11873
6
+ bookalimo-0.1.2.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ bookalimo-0.1.2.dist-info/METADATA,sha256=XWdArhmpR0SfcsQtD10Y1EG6kBHAshbx_Xy25SG00ss,9005
8
+ bookalimo-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ bookalimo-0.1.2.dist-info/top_level.txt,sha256=ZgYiDX2GfZCp4pevWn4X2qyEr-Dh7-cq5Y1j2jMhB1s,10
10
+ bookalimo-0.1.2.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- bookalimo/__init__.py,sha256=ch1t7uvw_F3zNpqb-IfH0n2sDwFLnAQDgm2lpwtvpj4,568
2
- bookalimo/_client.py,sha256=sGkTevqSi0PU8UbU4E2JBnstIuzLIq0R9N5cENy_fPg,11832
3
- bookalimo/models.py,sha256=-gvxrT7llrYLxSHWn3vpmvkQqnk2ejSd97Sw8BxgBLw,16420
4
- bookalimo/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
5
- bookalimo/wrapper.py,sha256=ABs8ORdGnCeJoWH2YIM5VlC4ZioZSNg880ev-MySiTM,11840
6
- bookalimo-0.1.1.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- bookalimo-0.1.1.dist-info/METADATA,sha256=Yo2NZ-cwIU1ekDpeT5M3IF779xqY4vVtbxoVSIiuTvA,9225
8
- bookalimo-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- bookalimo-0.1.1.dist-info/top_level.txt,sha256=ZgYiDX2GfZCp4pevWn4X2qyEr-Dh7-cq5Y1j2jMhB1s,10
10
- bookalimo-0.1.1.dist-info/RECORD,,