nebu 0.1.55__py3-none-any.whl → 0.1.56__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.
- nebu/processors/processor.py +9 -2
- {nebu-0.1.55.dist-info → nebu-0.1.56.dist-info}/METADATA +1 -1
- {nebu-0.1.55.dist-info → nebu-0.1.56.dist-info}/RECORD +6 -6
- {nebu-0.1.55.dist-info → nebu-0.1.56.dist-info}/WHEEL +0 -0
- {nebu-0.1.55.dist-info → nebu-0.1.56.dist-info}/licenses/LICENSE +0 -0
- {nebu-0.1.55.dist-info → nebu-0.1.56.dist-info}/top_level.txt +0 -0
nebu/processors/processor.py
CHANGED
@@ -212,7 +212,11 @@ class Processor(Generic[InputType]):
|
|
212
212
|
return self.send(data=data, wait=wait)
|
213
213
|
|
214
214
|
def send(
|
215
|
-
self,
|
215
|
+
self,
|
216
|
+
data: InputType,
|
217
|
+
wait: bool = False,
|
218
|
+
logs: bool = False,
|
219
|
+
api_key: Optional[str] = None,
|
216
220
|
) -> Dict[str, Any]:
|
217
221
|
"""
|
218
222
|
Send data to the processor and optionally stream logs in the background.
|
@@ -227,6 +231,9 @@ class Processor(Generic[InputType]):
|
|
227
231
|
processor_name = self.processor.metadata.name
|
228
232
|
processor_namespace = self.processor.metadata.namespace
|
229
233
|
|
234
|
+
if not api_key:
|
235
|
+
api_key = self.api_key
|
236
|
+
|
230
237
|
# --- Send Data ---
|
231
238
|
messages_url = (
|
232
239
|
f"{self.processors_url}/{processor_namespace}/{processor_name}/messages"
|
@@ -238,7 +245,7 @@ class Processor(Generic[InputType]):
|
|
238
245
|
response = requests.post(
|
239
246
|
messages_url,
|
240
247
|
json=stream_data.model_dump(mode="json", exclude_none=True),
|
241
|
-
headers={"Authorization": f"Bearer {
|
248
|
+
headers={"Authorization": f"Bearer {api_key}"},
|
242
249
|
)
|
243
250
|
response.raise_for_status()
|
244
251
|
send_response_json = response.json()
|
@@ -14,12 +14,12 @@ nebu/processors/consumer.py,sha256=q4cFKPEfMf1xIs0Y3CjUDCR35QVjr0F_hSOZUKUYc_U,3
|
|
14
14
|
nebu/processors/decorate.py,sha256=f4y0BL2W07XMMVzm0GPwh7GfJ-QRioSjBofJSa7hQtg,53175
|
15
15
|
nebu/processors/default.py,sha256=W4slJenG59rvyTlJ7gRp58eFfXcNOTT2Hfi6zzJAobI,365
|
16
16
|
nebu/processors/models.py,sha256=y40HoW-MEzDWB2dm_tsYlUy3Nf3s6eiLC0iGO9BoNog,3956
|
17
|
-
nebu/processors/processor.py,sha256=
|
17
|
+
nebu/processors/processor.py,sha256=1iFR5JEOYrUpljSJtRzNKFpmUyZU-KWb_dJQDE9IEPs,15613
|
18
18
|
nebu/processors/remote.py,sha256=TeAIPGEMqnDIb7H1iett26IEZrBlcbPB_-DSm6jcH1E,1285
|
19
19
|
nebu/redis/models.py,sha256=coPovAcVXnOU1Xh_fpJL4PO3QctgK9nBe5QYoqEcnxg,1230
|
20
20
|
nebu/services/service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
-
nebu-0.1.
|
22
|
-
nebu-0.1.
|
23
|
-
nebu-0.1.
|
24
|
-
nebu-0.1.
|
25
|
-
nebu-0.1.
|
21
|
+
nebu-0.1.56.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
22
|
+
nebu-0.1.56.dist-info/METADATA,sha256=k1ZNw6tIK0LLhliNmgcqNjRKz_BQZyuRkY6SfjIt5PY,1731
|
23
|
+
nebu-0.1.56.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
24
|
+
nebu-0.1.56.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
|
25
|
+
nebu-0.1.56.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|