naeural-client 2.0.0__py3-none-any.whl → 2.0.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.
naeural_client/_ver.py CHANGED
@@ -1,4 +1,4 @@
1
- __VER__ = "2.0.0"
1
+ __VER__ = "2.0.2"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
@@ -1640,7 +1640,9 @@ class GenericSession(BaseDecentrAIObject):
1640
1640
  *,
1641
1641
  node,
1642
1642
  name,
1643
- signature,
1643
+ signature="CUSTOM_CODE_FASTAPI_01",
1644
+ endpoints=None,
1645
+ use_ngrok=True,
1644
1646
  **kwargs
1645
1647
  ):
1646
1648
 
@@ -1652,8 +1654,16 @@ class GenericSession(BaseDecentrAIObject):
1652
1654
  instance = pipeline.create_plugin_instance(
1653
1655
  signature=signature,
1654
1656
  instance_id=self.log.get_unique_id(),
1657
+ use_ngrok=use_ngrok,
1655
1658
  **kwargs
1656
1659
  )
1660
+
1661
+ if endpoints is not None:
1662
+ for endpoint in endpoints:
1663
+ assert isinstance(endpoint, dict), "Each endpoint must be a dictionary defining the endpoint configuration."
1664
+ instance.add_new_endpoint(**endpoint)
1665
+ # end for
1666
+ # end if we have endpoints defined in the call
1657
1667
 
1658
1668
  return pipeline, instance
1659
1669