Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print out commercial software notification on import #50

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ Values are always applied to the logic in timestamp (not arrival) order.

## License

bytewax-interval is commercially licensed with publicly available source code.
Please see the full details in [LICENSE](./LICENSE.md).
`bytewax-interval` is commercially licensed with publicly available
source code. You are welcome to prototype using this module for free,
but any use on business data requires a paid license. See
https://modules.bytewax.io/ for a license. Please see the full details
in [LICENSE](./LICENSE.md).
14 changes: 14 additions & 0 deletions src/bytewax/interval/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Time-based interval operators."""

import copy
import os
import sys
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from datetime import datetime, timedelta
Expand Down Expand Up @@ -43,6 +45,18 @@
)
from typing_extensions import TypeAlias, overload, override

if "BYTEWAX_LICENSE" not in os.environ:
msg = (
"`bytewax-interval` 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)


LeftRight: TypeAlias = Literal["left", "right"]
"""Which side did a value come from."""

Expand Down