bell-tag 1.0.8__py3-none-any.whl → 1.1.0__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.
Potentially problematic release.
This version of bell-tag might be problematic. Click here for more details.
- bell_tag/decorators.py +2 -2
- bell_tag/middleware.py +2 -2
- bell_tag/utils.py +8 -2
- {bell_tag-1.0.8.dist-info → bell_tag-1.1.0.dist-info}/METADATA +1 -1
- bell_tag-1.1.0.dist-info/RECORD +10 -0
- bell_tag-1.0.8.dist-info/RECORD +0 -10
- {bell_tag-1.0.8.dist-info → bell_tag-1.1.0.dist-info}/WHEEL +0 -0
- {bell_tag-1.0.8.dist-info → bell_tag-1.1.0.dist-info}/top_level.txt +0 -0
bell_tag/decorators.py
CHANGED
|
@@ -35,9 +35,9 @@ def bell_tag(name: str = None):
|
|
|
35
35
|
method = request.method
|
|
36
36
|
|
|
37
37
|
requests.post(
|
|
38
|
-
"https://belltagmanager.com/api/v1/
|
|
38
|
+
"https://dev.belltagmanager.com/api/v1/bell_tag/dev/js",
|
|
39
39
|
json={
|
|
40
|
-
"
|
|
40
|
+
"key": api_key,
|
|
41
41
|
"route_name": route_name,
|
|
42
42
|
"path": path,
|
|
43
43
|
"method": method,
|
bell_tag/middleware.py
CHANGED
|
@@ -22,9 +22,9 @@ def create_before_request_handler(app):
|
|
|
22
22
|
method = request.method
|
|
23
23
|
|
|
24
24
|
requests.post(
|
|
25
|
-
"https://belltagmanager.com/api/v1/
|
|
25
|
+
"https://dev.belltagmanager.com/api/v1/bell_tag/dev/js",
|
|
26
26
|
json={
|
|
27
|
-
"
|
|
27
|
+
"key": api_key,
|
|
28
28
|
"path": path,
|
|
29
29
|
"method": method,
|
|
30
30
|
"ip": ip_address,
|
bell_tag/utils.py
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
_verified = False # internal flag for verification
|
|
4
4
|
|
|
5
|
+
def load_env_config():
|
|
6
|
+
from dotenv import load_dotenv
|
|
7
|
+
import os
|
|
8
|
+
"""Load BELL_KEY from .env"""
|
|
9
|
+
load_dotenv() # loads .env from current working directory
|
|
10
|
+
return {"BELL_KEY": os.getenv("BELL_KEY")}
|
|
5
11
|
def verify_server_once(api_key):
|
|
6
12
|
"""Verify server with API once per process, fail silently if server is down"""
|
|
7
13
|
global _verified
|
|
@@ -11,8 +17,8 @@ def verify_server_once(api_key):
|
|
|
11
17
|
try:
|
|
12
18
|
import requests
|
|
13
19
|
resp = requests.post(
|
|
14
|
-
"https://belltagmanager.com/api/v1/verify",
|
|
15
|
-
json={"
|
|
20
|
+
"https://dev.belltagmanager.com/api/v1/bell_tag/dev/js/verify",
|
|
21
|
+
json={"key": api_key},
|
|
16
22
|
timeout=5
|
|
17
23
|
)
|
|
18
24
|
if resp.status_code == 200:
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
bell_tag/__init__.py,sha256=9gUiTu_ERtU4dzpFDL07Tr7w66vhSL_QPAim2FjXfRE,232
|
|
2
|
+
bell_tag/decorators.py,sha256=F-lBMLlYJ-74KmlXXmTHwZ92puqf9KvFLNRdFrAQtX4,1926
|
|
3
|
+
bell_tag/exceptions.py,sha256=Z3iiOE_PXyM06cVrS531G_f3EH4DnC5QB5lcuiM-xng,94
|
|
4
|
+
bell_tag/middleware.py,sha256=TkMKf6qk0soxLYf4-JfK6kYv5dI5k8_GgHNKwEc8vUo,1109
|
|
5
|
+
bell_tag/py.typed,sha256=LeuNCoxZozlVi222NDN-i_wW5_jAlti_H1mOypLzovw,50
|
|
6
|
+
bell_tag/utils.py,sha256=i7YF12rlXb4keO4cwuJXER1AX5Gkk93DJX7mbG09YjQ,1128
|
|
7
|
+
bell_tag-1.1.0.dist-info/METADATA,sha256=7ugtX6IJRskfjyaoAJycES5t9JXYkB7csihFkB-Y5Zg,667
|
|
8
|
+
bell_tag-1.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
9
|
+
bell_tag-1.1.0.dist-info/top_level.txt,sha256=zNG3fCyKOmwKuKQz5PFEbzWq9T2tH4C1Tx3CvevSIRg,9
|
|
10
|
+
bell_tag-1.1.0.dist-info/RECORD,,
|
bell_tag-1.0.8.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
bell_tag/__init__.py,sha256=9gUiTu_ERtU4dzpFDL07Tr7w66vhSL_QPAim2FjXfRE,232
|
|
2
|
-
bell_tag/decorators.py,sha256=DlrGRqHqLE1h7wYQ70jheACNxxGlyn5QWfv62oVtOpk,1916
|
|
3
|
-
bell_tag/exceptions.py,sha256=Z3iiOE_PXyM06cVrS531G_f3EH4DnC5QB5lcuiM-xng,94
|
|
4
|
-
bell_tag/middleware.py,sha256=oh7MvtZ8RxPoZ330jIVoELPnqvOGNzyD4CeqA6LRqMU,1099
|
|
5
|
-
bell_tag/py.typed,sha256=LeuNCoxZozlVi222NDN-i_wW5_jAlti_H1mOypLzovw,50
|
|
6
|
-
bell_tag/utils.py,sha256=j26ydmWfiLO90OikQeGyjwhnMWds1CQ2OinHZB1QX5s,896
|
|
7
|
-
bell_tag-1.0.8.dist-info/METADATA,sha256=M5kCuz8ZPxH7nwJnItwpHtzmDF6HUYKkyDGplcMBTf0,667
|
|
8
|
-
bell_tag-1.0.8.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
9
|
-
bell_tag-1.0.8.dist-info/top_level.txt,sha256=zNG3fCyKOmwKuKQz5PFEbzWq9T2tH4C1Tx3CvevSIRg,9
|
|
10
|
-
bell_tag-1.0.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|