port-ocean 0.12.9.dev1__py3-none-any.whl → 0.13.0__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.

Potentially problematic release.


This version of port-ocean might be problematic. Click here for more details.

@@ -5,7 +5,7 @@ description = "{{cookiecutter.integration_short_description}}"
5
5
  authors = ["{{cookiecutter.full_name}} <{{cookiecutter.email}}>"]
6
6
 
7
7
  [tool.poetry.dependencies]
8
- python = "^3.11"
8
+ python = "^3.12"
9
9
  port_ocean = { version = "^{% version %}", extras = ["cli"] }
10
10
 
11
11
  [tool.poetry.group.dev.dependencies]
port_ocean/ocean.py CHANGED
@@ -39,22 +39,8 @@ class Ocean:
39
39
  config_override: Dict[str, Any] | None = None,
40
40
  ):
41
41
  initialize_port_ocean_context(self)
42
-
43
- @asynccontextmanager
44
- async def lifespan(_: FastAPI) -> AsyncIterator[None]:
45
- try:
46
- await self.integration.start()
47
- await self._setup_scheduled_resync()
48
- yield None
49
- except Exception:
50
- logger.exception("Integration had a fatal error. Shutting down.")
51
- logger.complete()
52
- sys.exit("Server stopped")
53
- finally:
54
- signal_handler.exit()
55
-
56
- self.fast_api_app = app or FastAPI(lifespan=lifespan)
57
- # self.fast_api_app.middleware("http")(request_handler)
42
+ self.fast_api_app = app or FastAPI()
43
+ self.fast_api_app.middleware("http")(request_handler)
58
44
 
59
45
  self.config = IntegrationConfiguration(
60
46
  # type: ignore
@@ -127,4 +113,20 @@ class Ocean:
127
113
  await repeated_function()
128
114
 
129
115
  async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
116
+ self.fast_api_app.include_router(self.integration_router, prefix="/integration")
117
+
118
+ @asynccontextmanager
119
+ async def lifecycle(_: FastAPI) -> AsyncIterator[None]:
120
+ try:
121
+ await self.integration.start()
122
+ await self._setup_scheduled_resync()
123
+ yield None
124
+ except Exception:
125
+ logger.exception("Integration had a fatal error. Shutting down.")
126
+ logger.complete()
127
+ sys.exit("Server stopped")
128
+ finally:
129
+ signal_handler.exit()
130
+
131
+ self.fast_api_app.router.lifespan_context = lifecycle
130
132
  await self.fast_api_app(scope, receive, send)
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.12.9.dev1
3
+ Version: 0.13.0
4
4
  Summary: Port Ocean is a CLI tool for managing your Port projects.
5
5
  Home-page: https://app.getport.io
6
6
  Keywords: ocean,port-ocean,port
7
7
  Author: Daniel Sinai
8
8
  Author-email: daniel@getport.io
9
- Requires-Python: >=3.11,<4.0
9
+ Requires-Python: >=3.12,<4.0
10
10
  Classifier: Framework :: FastAPI
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
@@ -14,9 +14,9 @@ Classifier: Natural Language :: English
14
14
  Classifier: Operating System :: POSIX
15
15
  Classifier: Programming Language :: Python
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
19
18
  Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Topic :: Software Development :: Libraries
21
21
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
22
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -32,7 +32,7 @@ port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/changelog/.gitigno
32
32
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/debug.py,sha256=_TRsA2s6GV2E3CTI8CHcsH-ZuH4_Eh5-juDXWaET0ho,65
33
33
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/main.py,sha256=XUwo9yroqSKxAdwVrTKGNGSWvec9n1Rh9Cqvep4HIuE,2257
34
34
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/poetry.toml,sha256=kENq8nNmFPIzw9vySheyG4xHxAPuBSpZO1CYGD6G2NE,46
35
- port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/pyproject.toml,sha256=6B_RiBsk20XZAb3nXnnUAf_FEiaTGlWedw7NZeVxTz0,2358
35
+ port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/pyproject.toml,sha256=vG27DXTTEL7n68aXzITNfSdr9s7l66U038yCBB9wFO8,2358
36
36
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/sonar-project.properties,sha256=timmRpoSd50BdxLf45OcFUk2qs855z610kzz3yLAqJw,124
37
37
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/test_sample.py,sha256=Ew5LA_G1k6DC5a2ygU2FoyjZQa0fRmPy73N0bio0d14,46
@@ -115,7 +115,7 @@ port_ocean/log/handlers.py,sha256=ncVjgqrZRh6BhyRrA6DQG86Wsbxph1yWYuEC0cWfe-Q,36
115
115
  port_ocean/log/logger_setup.py,sha256=CoEDowe5OwNOL_5clU6Z4faktfh0VWaOTS0VLmyhHjw,2404
116
116
  port_ocean/log/sensetive.py,sha256=lVKiZH6b7TkrZAMmhEJRhcl67HNM94e56x12DwFgCQk,2920
117
117
  port_ocean/middlewares.py,sha256=9wYCdyzRZGK1vjEJ28FY_DkfwDNENmXp504UKPf5NaQ,2727
118
- port_ocean/ocean.py,sha256=zSJeQ08sQPiSLGa5Qyl06_hrM8GtAu4ZoJMvVVb4OyU,4972
118
+ port_ocean/ocean.py,sha256=jwws4U21EwFDXzM517dOlGIuvmLMVdAeIrgCRR6se-8,5105
119
119
  port_ocean/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  port_ocean/run.py,sha256=rTxBlrQd4yyrtgErCFJCHCEHs7d1OXrRiJehUYmIbN0,2212
121
121
  port_ocean/sonar-project.properties,sha256=X_wLzDOkEVmpGLRMb2fg9Rb0DxWwUFSvESId8qpvrPI,73
@@ -142,8 +142,8 @@ port_ocean/utils/repeat.py,sha256=0EFWM9d8lLXAhZmAyczY20LAnijw6UbIECf5lpGbOas,32
142
142
  port_ocean/utils/signal.py,sha256=K-6kKFQTltcmKDhtyZAcn0IMa3sUpOHGOAUdWKgx0_E,1369
143
143
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
144
144
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
145
- port_ocean-0.12.9.dev1.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
146
- port_ocean-0.12.9.dev1.dist-info/METADATA,sha256=uW3sO9Lg2ZDEKDTayJCVgRIraS2xpiJ1Wr3tuHyNneU,6678
147
- port_ocean-0.12.9.dev1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
148
- port_ocean-0.12.9.dev1.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
149
- port_ocean-0.12.9.dev1.dist-info/RECORD,,
145
+ port_ocean-0.13.0.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
146
+ port_ocean-0.13.0.dist-info/METADATA,sha256=ajsTJbQRHuhu8GKNa1CZ8ZFGu23_dyP2umXKTx-ao1g,6673
147
+ port_ocean-0.13.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
148
+ port_ocean-0.13.0.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
149
+ port_ocean-0.13.0.dist-info/RECORD,,