bell-tag 1.0.8__tar.gz → 1.1.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bell-tag
3
- Version: 1.0.8
3
+ Version: 1.1.0
4
4
  Summary: Secure Flask analytics tracking library
5
5
  Author-email: Bell Network <support@bellnetwork.eu>
6
6
  License-Expression: MIT
@@ -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/track",
38
+ "https://dev.belltagmanager.com/api/v1/bell_tag/dev/js",
39
39
  json={
40
- "api_key": api_key,
40
+ "key": api_key,
41
41
  "route_name": route_name,
42
42
  "path": path,
43
43
  "method": method,
@@ -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/track",
25
+ "https://dev.belltagmanager.com/api/v1/bell_tag/dev/js",
26
26
  json={
27
- "api_key": api_key,
27
+ "key": api_key,
28
28
  "path": path,
29
29
  "method": method,
30
30
  "ip": ip_address,
@@ -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={"api_key": api_key},
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bell-tag
3
- Version: 1.0.8
3
+ Version: 1.1.0
4
4
  Summary: Secure Flask analytics tracking library
5
5
  Author-email: Bell Network <support@bellnetwork.eu>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "bell-tag"
7
- version = "1.0.8"
7
+ version = "1.1.0"
8
8
  description = "Secure Flask analytics tracking library"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes