aidbox-python-sdk 0.2.1__tar.gz → 0.2.2__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 (26) hide show
  1. {aidbox_python_sdk-0.2.1/aidbox_python_sdk.egg-info → aidbox_python_sdk-0.2.2}/PKG-INFO +1 -1
  2. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/__init__.py +1 -1
  3. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/handlers.py +1 -8
  4. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2/aidbox_python_sdk.egg-info}/PKG-INFO +1 -1
  5. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/tests/test_sdk.py +0 -12
  6. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/LICENSE.md +0 -0
  7. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/MANIFEST.in +0 -0
  8. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/README.md +0 -0
  9. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/aidboxpy.py +0 -0
  10. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/app_keys.py +0 -0
  11. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/db.py +0 -0
  12. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/db_migrations.py +0 -0
  13. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/exceptions.py +0 -0
  14. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/main.py +0 -0
  15. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/py.typed +0 -0
  16. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/pytest_plugin.py +0 -0
  17. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/sdk.py +0 -0
  18. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/settings.py +0 -0
  19. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk/types.py +0 -0
  20. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/SOURCES.txt +0 -0
  21. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/dependency_links.txt +0 -0
  22. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/not-zip-safe +0 -0
  23. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/requires.txt +0 -0
  24. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/aidbox_python_sdk.egg-info/top_level.txt +0 -0
  25. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/pyproject.toml +0 -0
  26. {aidbox_python_sdk-0.2.1 → aidbox_python_sdk-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aidbox-python-sdk
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Aidbox SDK for python
5
5
  Author-email: "beda.software" <aidbox-python-sdk@beda.software>
6
6
  License: MIT License
@@ -1,5 +1,5 @@
1
1
  __title__ = "aidbox-python-sdk"
2
- __version__ = "0.2.1"
2
+ __version__ = "0.2.2"
3
3
  __author__ = "beda.software"
4
4
  __license__ = "None"
5
5
  __copyright__ = "Copyright 2024 beda.software"
@@ -1,10 +1,9 @@
1
1
  import asyncio
2
- import json
3
2
  import logging
4
3
  from typing import Any
5
4
 
6
5
  from aiohttp import web
7
- from fhirpy.base.exceptions import BaseFHIRError, OperationOutcome
6
+ from fhirpy.base.exceptions import OperationOutcome
8
7
 
9
8
  from . import app_keys as ak
10
9
 
@@ -49,12 +48,6 @@ async def operation(request: web.Request, data: dict[str, Any]):
49
48
  return result
50
49
  except OperationOutcome as exc:
51
50
  return web.json_response(exc.resource, status=422)
52
- except BaseFHIRError as exc:
53
- try:
54
- payload = json.loads(str(exc))
55
- return web.json_response(payload, status=422)
56
- except (json.JSONDecodeError, TypeError):
57
- return web.Response(text=str(exc), status=422, content_type="text/plain")
58
51
 
59
52
 
60
53
  TYPES = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aidbox-python-sdk
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Aidbox SDK for python
5
5
  Author-email: "beda.software" <aidbox-python-sdk@beda.software>
6
6
  License: MIT License
@@ -192,18 +192,6 @@ async def test_aidbox_db_fixture(client, aidbox_db: DBProxy, safe_db):
192
192
  assert app_ids == [{"id": "app-test"}]
193
193
 
194
194
 
195
- async def test_operation_base_fhir_error_json_test_op(aidbox_client):
196
- with pytest.raises(OperationOutcome) as exc:
197
- await aidbox_client.execute("/$base-fhir-error-json-test")
198
- assert exc.value.resource.get("issue")[0].get("diagnostics") == "Resource Patient/id not found"
199
-
200
-
201
- async def test_operation_base_fhir_error_text_test_op(aidbox_client):
202
- with pytest.raises(OperationOutcome) as exc:
203
- await aidbox_client.execute("/$base-fhir-error-text-test")
204
- assert exc.value.resource.get("issue")[0].get("diagnostics") == "plain"
205
-
206
-
207
195
  async def test_operation_outcome_test_op(aidbox_client):
208
196
  with pytest.raises(OperationOutcome) as exc:
209
197
  await aidbox_client.execute("/$operation-outcome-test")