active-boxes 0.0.1.dev2__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.
- active_boxes/__init__.py +12 -0
- active_boxes/__version__.py +11 -0
- active_boxes/activitypub.py +984 -0
- active_boxes/backend.py +128 -0
- active_boxes/collection.py +70 -0
- active_boxes/content_helper.py +69 -0
- active_boxes/errors.py +92 -0
- active_boxes/httpsig.py +145 -0
- active_boxes/key.py +63 -0
- active_boxes/linked_data_sig.py +83 -0
- active_boxes/urlutils.py +66 -0
- active_boxes/webfinger.py +92 -0
- active_boxes-0.0.1.dev2.dist-info/LICENSE +22 -0
- active_boxes-0.0.1.dev2.dist-info/METADATA +45 -0
- active_boxes-0.0.1.dev2.dist-info/RECORD +16 -0
- active_boxes-0.0.1.dev2.dist-info/WHEEL +4 -0
active_boxes/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
logger = logging.getLogger(__name__)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def strtobool(s: str) -> bool: # pragma: no cover
|
|
7
|
+
if s in ["y", "yes", "true", "on", "1"]:
|
|
8
|
+
return True
|
|
9
|
+
if s in ["n", "no", "false", "off", "0"]:
|
|
10
|
+
return False
|
|
11
|
+
|
|
12
|
+
raise ValueError(f"cannot convert {s} to bool")
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
try:
|
|
2
|
+
import importlib.metadata as importlib_metadata
|
|
3
|
+
except ImportError:
|
|
4
|
+
# Python < 3.8
|
|
5
|
+
import importlib_metadata
|
|
6
|
+
|
|
7
|
+
try:
|
|
8
|
+
__version__ = importlib_metadata.version("active-boxes")
|
|
9
|
+
except importlib_metadata.PackageNotFoundError:
|
|
10
|
+
# Package is not installed
|
|
11
|
+
__version__ = "unknown"
|