pipelex-api 0.82.0__tar.gz → 0.84.0__tar.gz

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.
Files changed (42) hide show
  1. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/PKG-INFO +2 -2
  2. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/codegen.py +12 -0
  3. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/.gitignore +0 -0
  4. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/LICENSE +0 -0
  5. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/README.md +0 -0
  6. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/hatch_build.py +0 -0
  7. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/__init__.py +0 -0
  8. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/api.toml +0 -0
  9. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/api_config.py +0 -0
  10. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/bundle.py +0 -0
  11. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/disclosure.py +0 -0
  12. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/error_types.py +0 -0
  13. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/error_uri.py +0 -0
  14. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/errors.py +0 -0
  15. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/exception_handlers.py +0 -0
  16. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/json_body.py +0 -0
  17. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/limits.py +0 -0
  18. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/main.py +0 -0
  19. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/method_cache.py +0 -0
  20. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/method_source.py +0 -0
  21. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/middleware.py +0 -0
  22. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/openapi_responses.py +0 -0
  23. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/openapi_schema.py +0 -0
  24. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/problem_document.py +0 -0
  25. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/py.typed +0 -0
  26. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/__init__.py +0 -0
  27. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/health.py +0 -0
  28. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/__init__.py +0 -0
  29. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/agent/__init__.py +0 -0
  30. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/agent/models.py +0 -0
  31. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/crate_ops.py +0 -0
  32. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/pipe_io.py +0 -0
  33. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/pipeline.py +0 -0
  34. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/resolve.py +0 -0
  35. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/tools.py +0 -0
  36. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/utils.py +0 -0
  37. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/pipelex/validate.py +0 -0
  38. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/routes/version.py +0 -0
  39. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/schemas/__init__.py +0 -0
  40. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/schemas/models.py +0 -0
  41. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pipelex_api/security.py +0 -0
  42. {pipelex_api-0.82.0 → pipelex_api-0.84.0}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pipelex-api
3
- Version: 0.82.0
3
+ Version: 0.84.0
4
4
  Summary: Pipelex API
5
5
  Project-URL: Homepage, https://pipelex.com
6
6
  Project-URL: Repository, https://github.com/Pipelex/pipelex
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.13
16
16
  Classifier: Programming Language :: Python :: 3.14
17
17
  Requires-Python: <3.15,>=3.11
18
18
  Requires-Dist: fastapi<0.142,>=0.118.0
19
- Requires-Dist: pipelex[anthropic,bedrock,fal,google,google-genai,mistralai]==0.82.0
19
+ Requires-Dist: pipelex[anthropic,bedrock,fal,google,google-genai,mistralai]==0.84.0
20
20
  Requires-Dist: pyjwt>=2.10.1
21
21
  Requires-Dist: uvicorn>=0.37.0
22
22
  Provides-Extra: dev
@@ -8,6 +8,8 @@ from pipelex.codegen.emitters.target import CodegenKind, CodegenTarget
8
8
  from pipelex.codegen.emitters.types_emitter import emit_types
9
9
  from pipelex.codegen.lock import CODEGEN_LOCK_FILENAME
10
10
  from pipelex.pipeline.exceptions import ValidateBundleError
11
+ from pipelex.pipeline.usage_stats_reporting import CodeGenerationReport, usage_stats_codegen_target
12
+ from pipelex.system.usage_stats.usage_stats_contract import UsageStatsCodegenArtifact
11
13
  from pipelex.tools.misc.package_utils import get_package_version
12
14
  from pipelex.tools.typing.pydantic_utils import empty_list_factory_of
13
15
  from pydantic import BaseModel, Field, model_validator
@@ -136,12 +138,22 @@ async def codegen_mthds(request_data: CodegenRequest) -> JSONResponse:
136
138
  `method_ref` is a 501 until server-side method registry resolution exists; auth is 401/403;
137
139
  server fault is 5xx.
138
140
  """
141
+ with CodeGenerationReport(
142
+ artifact=UsageStatsCodegenArtifact.TYPES, target=usage_stats_codegen_target(target=request_data.target)
143
+ ) as generation_report:
144
+ return _generate_codegen_response(request_data=request_data, generation_report=generation_report)
145
+
146
+
147
+ def _generate_codegen_response(*, request_data: CodegenRequest, generation_report: CodeGenerationReport) -> JSONResponse:
148
+ """The body of `codegen_mthds`, timed by `generation_report`, which an invalid verdict declares failed."""
139
149
  try:
140
150
  # `types` is concept-set-wide: no pipe is selected, so the manifest's `main_pipe` beside the crate is unused.
141
151
  # A future per-pipe kind takes it from the `ResolvedClosure` and hands it to `resolve_requested_pipe`.
142
152
  crate = resolve_requested_crate(request_data).crate
143
153
  except ValidateBundleError as validate_error:
154
+ generation_report.declare_failed()
144
155
  return invalid_crate_report_response(validate_error.to_error_report())
156
+ generation_report.describe(crate=crate)
145
157
  try:
146
158
  emitted = emit_types(crate, target=request_data.target)
147
159
  projection = build_stamped_projection(
File without changes
File without changes
File without changes