This is an automated email from the ASF dual-hosted git repository.
bossenti pushed a commit to branch rel/0.92.0
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/rel/0.92.0 by this push:
new f97b05df6 chore: mark streampipes-wrapper-python as deprecated (#1623)
f97b05df6 is described below
commit f97b05df6eb52543275a230c85a04dfd68799803
Author: Tim <[email protected]>
AuthorDate: Sat May 27 15:18:33 2023 +0200
chore: mark streampipes-wrapper-python as deprecated (#1623)
---
streampipes-wrapper-python/README.md | 91 ++--------------------
streampipes-wrapper-python/setup.py | 1 +
streampipes-wrapper-python/streampipes/api/rest.py | 2 +
streampipes-wrapper-python/streampipes/core.py | 3 +
streampipes-wrapper-python/streampipes/declarer.py | 4 +-
.../streampipes/instances.py | 7 +-
streampipes-wrapper-python/streampipes/manager.py | 2 +
.../model/base/abstract_streampipes_entity.py | 3 +
.../model/base/consumable_streampipes_entity.py | 3 +
.../model/base/named_streampipes_entity.py | 3 +
.../model/base/unnamed_streampipes_entity.py | 4 +
.../streampipes/model/config_item.py | 2 +
.../model/graph/data_processor_description.py | 2 +
.../streampipes/model/pipeline_element_config.py | 2 +
.../staticproperty/free_text_StaticProperty.py | 5 +-
.../model/staticproperty/static_property.py | 3 +
.../streampipes/submitter.py | 3 +-
.../streampipes/utils/register.py | 2 +
18 files changed, 51 insertions(+), 91 deletions(-)
diff --git a/streampipes-wrapper-python/README.md
b/streampipes-wrapper-python/README.md
index 9a6143790..03e50b41c 100644
--- a/streampipes-wrapper-python/README.md
+++ b/streampipes-wrapper-python/README.md
@@ -16,91 +16,10 @@
~
-->
-[](https://github.com/apache/streampipes/actions/)
-[](https://hub.docker.com/r/apachestreampipes/backend/)
-[](https://img.shields.io/maven-central/v/org.apache.streampipes/streampipes-backend.svg)
-[](http://www.apache.org/licenses/LICENSE-2.0)
-[]()
-[](https://twitter.com/StreamPipes)
+## Apache StreamPipes Wrapper for Python - DEPRECATED
-## Apache StreamPipes Wrapper for Python [WIP]
+StreamPipes effort to support Python is continued in [StreamPipes
Python](https://github.com/apache/streampipes/tree/dev/streampipes-client-python):
+- [Documentation](https://streampipes.apache.org/docs/docs/python/latest/)
+- [Download from PyPi](https://pypi.org/project/streampipes/)
-**NOTE**:
-
-> The StreamPipes wrapper for python is currently under development. Thus, the
processor model description still needs
-> to be implemented externally in Java.
-
-## Apache StreamPipes
-
-Apache StreamPipes enables flexible modeling of stream processing pipelines by
providing a graphical
-modeling editor on top of existing stream processing frameworks.
-
-It leverages non-technical users to quickly define and execute processing
pipelines based on an easily extensible
-toolbox of data sources, data processors and data sinks. StreamPipes has an
exchangeable runtime execution layer and
-executes pipelines using one of the provided wrappers, e.g., for Apache Flink
or Apache Kafka Streams.
-
-Pipeline elements in StreamPipes can be installed at runtime - the built-in
SDK allows to easily implement new
-pipeline elements according to your needs. Pipeline elements are standalone
microservices that can run anywhere -
-centrally on your server, in a large-scale cluster or close at the edge.
-
-## A Speudocode Example
-
-**NOTE**:
-Only works in combination with Java!
-
-````
-from streampipes.core import StandaloneModelSubmitter
-from streampipes.manager import Declarer
-from streampipes.model.pipeline_element_config import Config
-from streampipes.core import EventProcessor
-
-
-class HelloWorldProcessor(EventProcessor):
-
- def on_invocation(self):
- pass
-
- def on_event(self, event):
- event['greeting'] = 'hello world'
- return event
-
- def on_detach(self):
- pass
-
-
-def main():
- # Configurations to be stored in key-value store (consul)
- config = Config(app_id='pe/org.apache.streampipes.processor.python')
-
- config.register(type='host',
- env_key='SP_HOST',
- default='processor-python',
- description='processor hostname')
-
- config.register(type='port',
- env_key='SP_PORT',
- default=8090,
- description='processor port')
-
- config.register(type='service',
- env_key='SP_SERVICE_NAME',
- default='Python Processor',
- description='processor service name')
-
- processors = {
- 'org.apache.streampipes.processors.python.helloworld':
HelloWorldProcessor,
- }
-
- # Declarer
- # add the dict of processors to the Declarer
- # This is an abstract class that holds the specified processors
- Declarer.add(processors=processors)
-
- # StandaloneModelSubmitter
- # Initializes the REST api
- StandaloneModelSubmitter.init(config=config)
-
-
-if __name__ == '__main__':
- main()
-````
+Therefore this module is deprecated from version 0.92.0 on and will probably
be remove in 0.93.0.
\ No newline at end of file
diff --git a/streampipes-wrapper-python/setup.py
b/streampipes-wrapper-python/setup.py
index fd4ecf3ee..a94733311 100644
--- a/streampipes-wrapper-python/setup.py
+++ b/streampipes-wrapper-python/setup.py
@@ -40,6 +40,7 @@ setup(
long_description_content_type='text/markdown',
install_requires=[
'confluent-kafka==1.4.2',
+ 'Deprecated==1.2.13',
'Flask==2.3.2',
'flask-classful==0.14.2',
'Flask-Negotiate==0.1.0',
diff --git a/streampipes-wrapper-python/streampipes/api/rest.py
b/streampipes-wrapper-python/streampipes/api/rest.py
index 9f47a4d80..e092ef53e 100644
--- a/streampipes-wrapper-python/streampipes/api/rest.py
+++ b/streampipes-wrapper-python/streampipes/api/rest.py
@@ -19,12 +19,14 @@ import threading
from waitress import serve
from flask import Flask
+from deprecated import deprecated
from streampipes.api.resources.dummy import DummyInterimsResource
from streampipes.api.resources.processor import SepaElementResource
from streampipes.api.resources.welcome import WelcomeResource
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class PipelineElementApi(object):
_FLASK_CONFIG = {
'DEBUG': False,
diff --git a/streampipes-wrapper-python/streampipes/core.py
b/streampipes-wrapper-python/streampipes/core.py
index 543f5d790..a6c8f010d 100644
--- a/streampipes-wrapper-python/streampipes/core.py
+++ b/streampipes-wrapper-python/streampipes/core.py
@@ -22,7 +22,10 @@ import threading
from confluent_kafka.admin import AdminClient
from confluent_kafka import Producer, Consumer
+from deprecated import deprecated
+
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class EventProcessor(object):
__metaclass__ = abc.ABC
diff --git a/streampipes-wrapper-python/streampipes/declarer.py
b/streampipes-wrapper-python/streampipes/declarer.py
index 042d56801..3e548b69c 100644
--- a/streampipes-wrapper-python/streampipes/declarer.py
+++ b/streampipes-wrapper-python/streampipes/declarer.py
@@ -15,7 +15,9 @@
# limitations under the License.
#
+from depreacted import deprecated
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class Singleton(type):
_instances = {}
@@ -24,7 +26,7 @@ class Singleton(type):
cls._instances[cls] = super(Singleton, cls).__call__(*args,
**kwargs)
return cls._instances[cls]
-
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class DeclarerSingleton(metaclass=Singleton):
""" EventProcessorManager holds running processor instances """
diff --git a/streampipes-wrapper-python/streampipes/instances.py
b/streampipes-wrapper-python/streampipes/instances.py
index b9871751c..369e4e558 100644
--- a/streampipes-wrapper-python/streampipes/instances.py
+++ b/streampipes-wrapper-python/streampipes/instances.py
@@ -15,15 +15,18 @@
# limitations under the License.
#
import abc
+from deprecated import deprecated
-
+@deprecated(version='0.92'
+ '.0', reason="Please switch to StreamPipes Python (see
README)")
class NamedStreamPipesEntity:
__metaclass__ = abc.ABC
def get_description(self):
pass
-
+@deprecated(version='0.92'
+ '.0', reason="Please switch to StreamPipes Python (see
README)")
class RunningInstances:
__metaclass__ = abc.ABC
diff --git a/streampipes-wrapper-python/streampipes/manager.py
b/streampipes-wrapper-python/streampipes/manager.py
index ba02251c9..04b4acc31 100644
--- a/streampipes-wrapper-python/streampipes/manager.py
+++ b/streampipes-wrapper-python/streampipes/manager.py
@@ -17,9 +17,11 @@
"""Manages processor life cycle"""
import logging
import abc
+from deprectaed import deprecated
from streampipes.declarer import DeclarerSingleton
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class ProcessorDispatcher(object):
__metaclass__ = abc.ABC
diff --git
a/streampipes-wrapper-python/streampipes/model/base/abstract_streampipes_entity.py
b/streampipes-wrapper-python/streampipes/model/base/abstract_streampipes_entity.py
index c01107189..7e1645e88 100644
---
a/streampipes-wrapper-python/streampipes/model/base/abstract_streampipes_entity.py
+++
b/streampipes-wrapper-python/streampipes/model/base/abstract_streampipes_entity.py
@@ -15,6 +15,9 @@
# limitations under the License.
#
+from deprecated import deprecated
+
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class AbstractStreamPipesEntity:
def __init__(self):
pass
diff --git
a/streampipes-wrapper-python/streampipes/model/base/consumable_streampipes_entity.py
b/streampipes-wrapper-python/streampipes/model/base/consumable_streampipes_entity.py
index c863fadd0..c0c256186 100644
---
a/streampipes-wrapper-python/streampipes/model/base/consumable_streampipes_entity.py
+++
b/streampipes-wrapper-python/streampipes/model/base/consumable_streampipes_entity.py
@@ -15,9 +15,12 @@
# limitations under the License.
#
import sys, os
+from deprecated import deprecated
sys.path.append(os.path.abspath("streampipes-wrapper-python"))
from streampipes.model.base.named_streampipes_Entity import
NamedStreamPipesEntity
+
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class ConsumableStreamPipesEntity(NamedStreamPipesEntity):
pass
diff --git
a/streampipes-wrapper-python/streampipes/model/base/named_streampipes_entity.py
b/streampipes-wrapper-python/streampipes/model/base/named_streampipes_entity.py
index 6ba386dfd..f0d5f9969 100644
---
a/streampipes-wrapper-python/streampipes/model/base/named_streampipes_entity.py
+++
b/streampipes-wrapper-python/streampipes/model/base/named_streampipes_entity.py
@@ -15,10 +15,13 @@
# limitations under the License.
#
import sys, os
+from deprecated import deprecated
sys.path.append(os.path.abspath("streampipes-wrapper-python"))
from streampipes.model.base.abstract_streampipes_entity import
AbstractStreamPipesEntity
+
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class NamedStreamPipesEntity(AbstractStreamPipesEntity):
def __init__(self):
self.applicationLinks = []
diff --git
a/streampipes-wrapper-python/streampipes/model/base/unnamed_streampipes_entity.py
b/streampipes-wrapper-python/streampipes/model/base/unnamed_streampipes_entity.py
index 27e172b0f..718576368 100644
---
a/streampipes-wrapper-python/streampipes/model/base/unnamed_streampipes_entity.py
+++
b/streampipes-wrapper-python/streampipes/model/base/unnamed_streampipes_entity.py
@@ -15,9 +15,13 @@
# limitations under the License.
#
import sys, os
+from deprecated import deprecated
sys.path.append(os.path.abspath("streampipes-wrapper-python"))
from streampipes.model.base.abstract_streampipes_entity import
AbstractStreamPipesEntity
+
+
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class UnnamedStreamPipesEntity(AbstractStreamPipesEntity):
__serialVersionUID = 8051137255998890188
diff --git a/streampipes-wrapper-python/streampipes/model/config_item.py
b/streampipes-wrapper-python/streampipes/model/config_item.py
index f9953976a..0a535f196 100644
--- a/streampipes-wrapper-python/streampipes/model/config_item.py
+++ b/streampipes-wrapper-python/streampipes/model/config_item.py
@@ -15,8 +15,10 @@
# limitations under the License.
#
import json
+from deprecated import deprecated
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class ConfigItem(object):
def __init__(self):
self.value = None
diff --git
a/streampipes-wrapper-python/streampipes/model/graph/data_processor_description.py
b/streampipes-wrapper-python/streampipes/model/graph/data_processor_description.py
index 979c240cd..f4d7afc0b 100644
---
a/streampipes-wrapper-python/streampipes/model/graph/data_processor_description.py
+++
b/streampipes-wrapper-python/streampipes/model/graph/data_processor_description.py
@@ -15,10 +15,12 @@
# limitations under the License.
#
import sys, os
+from depreacated import deprecated
sys.path.append(os.path.abspath("streampipes-wrapper-python"))
from streampipes.model.base.consumable_streampipes_entity import
ConsumableStreamPipesEntity
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class DataProcessorDescription (ConsumableStreamPipesEntity):
__serialVersionUID = 3995767921861518597
def __init__(self):
diff --git
a/streampipes-wrapper-python/streampipes/model/pipeline_element_config.py
b/streampipes-wrapper-python/streampipes/model/pipeline_element_config.py
index c0f3839ec..3a989ff66 100644
--- a/streampipes-wrapper-python/streampipes/model/pipeline_element_config.py
+++ b/streampipes-wrapper-python/streampipes/model/pipeline_element_config.py
@@ -15,9 +15,11 @@
# limitations under the License.
#
import os
+from deprecated import deprecated
from streampipes.model.config_item import ConfigItem
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class Config(object):
def __init__(self, app_id: str) -> None:
if not app_id:
diff --git
a/streampipes-wrapper-python/streampipes/model/staticproperty/free_text_StaticProperty.py
b/streampipes-wrapper-python/streampipes/model/staticproperty/free_text_StaticProperty.py
index 397e72cff..35ef9b11c 100644
---
a/streampipes-wrapper-python/streampipes/model/staticproperty/free_text_StaticProperty.py
+++
b/streampipes-wrapper-python/streampipes/model/staticproperty/free_text_StaticProperty.py
@@ -15,10 +15,13 @@
# limitations under the License.
#
import sys, os
+from deprecated import deprecated
sys.path.append(os.path.abspath("streampipes-wrapper-python"))
-import streampipes.model.staticproperty.static_property
+import streampipes.model.staticproperty.static_property
+
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class FreeTextStaticProperty(StaticProperty):
__serialVersionUID = 1
def __init__(self):
diff --git
a/streampipes-wrapper-python/streampipes/model/staticproperty/static_property.py
b/streampipes-wrapper-python/streampipes/model/staticproperty/static_property.py
index 1dc3c872f..50965571d 100644
---
a/streampipes-wrapper-python/streampipes/model/staticproperty/static_property.py
+++
b/streampipes-wrapper-python/streampipes/model/staticproperty/static_property.py
@@ -15,10 +15,13 @@
# limitations under the License.
#
import sys, os
+from deprecated import deprecated
sys.path.append(os.path.abspath("streampipes-wrapper-python"))
from streampipes.model.base.unnamed_streampipes_entity import
UnnamedStreamPipesEntity
+
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class StaticProperty(UnnamedStreamPipesEntity):
__serialVersionUID = 2509153122084646025
diff --git a/streampipes-wrapper-python/streampipes/submitter.py
b/streampipes-wrapper-python/streampipes/submitter.py
index 3474cc3e6..ef75d4dbf 100644
--- a/streampipes-wrapper-python/streampipes/submitter.py
+++ b/streampipes-wrapper-python/streampipes/submitter.py
@@ -15,6 +15,7 @@
# limitations under the License.
#
import abc
+from deprecated import deprecated
from streampipes.api.rest import PipelineElementApi
from streampipes.base.banner import banner
@@ -22,7 +23,7 @@ from streampipes.declarer import DeclarerSingleton
from streampipes.model.pipeline_element_config import Config
from streampipes.utils.register import ConsulUtils
-
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class StandaloneModelSubmitter(object):
__metaclass__ = abc.ABC
diff --git a/streampipes-wrapper-python/streampipes/utils/register.py
b/streampipes-wrapper-python/streampipes/utils/register.py
index f38e26fbf..d76121eac 100644
--- a/streampipes-wrapper-python/streampipes/utils/register.py
+++ b/streampipes-wrapper-python/streampipes/utils/register.py
@@ -18,9 +18,11 @@
import os
import consul
from consul import Check
+from deprecated import deprecated
from streampipes.model.pipeline_element_config import Config
+@deprecated(version='0.92.0', reason="Please switch to StreamPipes Python (see
README)")
class ConsulUtils(object):
_DEFAULT_CONSUL_CONFIG = {
'CONSUL_HOST': 'consul',