diff --git a/src/bytewax/influxdb/__init__.py b/src/bytewax/influxdb/__init__.py index 7609d64..5c19096 100644 --- a/src/bytewax/influxdb/__init__.py +++ b/src/bytewax/influxdb/__init__.py @@ -1,6 +1,8 @@ """Sink and source connectors for influxdb.""" import logging +import os +import sys from datetime import datetime, timedelta, timezone from typing import Any, Dict, List, NamedTuple, Optional, Union @@ -11,6 +13,17 @@ from bytewax.inputs import FixedPartitionedSource, StatefulSourcePartition from bytewax.outputs import DynamicSink, StatelessSinkPartition +if "BYTEWAX_LICENSE" not in os.environ: + msg = ( + "`{{cookiecutter.project_slug}}` is commercially licensed " + "with publicly available source code.\n" + "You are welcome to prototype using this module for free, " + "but any use on business data requires a paid license.\n" + "See https://modules.bytewax.io/ for a license. " + "Set the env var `BYTEWAX_LICENSE=1` to suppress this message." + ) + print(msg, file=sys.stderr) + # Configure logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__)