secploy 0.2.7__tar.gz → 0.2.8__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.
- {secploy-0.2.7 → secploy-0.2.8}/LICENSE +1 -1
- {secploy-0.2.7/secploy.egg-info → secploy-0.2.8}/PKG-INFO +2 -2
- {secploy-0.2.7 → secploy-0.2.8}/secploy/client.py +5 -2
- {secploy-0.2.7 → secploy-0.2.8}/secploy/lib/config.py +7 -0
- secploy-0.2.8/secploy/utils.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8/secploy.egg-info}/PKG-INFO +2 -2
- {secploy-0.2.7 → secploy-0.2.8}/secploy.egg-info/SOURCES.txt +1 -0
- {secploy-0.2.7 → secploy-0.2.8}/setup.py +2 -2
- {secploy-0.2.7 → secploy-0.2.8}/MANIFEST.in +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/README.md +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy/__init__.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy/enums.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy/events.py +0 -0
- /secploy-0.2.7/secploy/utils.py → /secploy-0.2.8/secploy/handlers.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy/lib/__init__.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy/lib/secploy_logger.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy/log_capture.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy/processor.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy/schemas.py +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy.egg-info/dependency_links.txt +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy.egg-info/entry_points.txt +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy.egg-info/requires.txt +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/secploy.egg-info/top_level.txt +0 -0
- {secploy-0.2.7 → secploy-0.2.8}/setup.cfg +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: secploy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: Event tracking and monitoring SDK for Python applications
|
|
5
5
|
Home-page: https://github.com/agastronics/secploy-python-sdk
|
|
6
6
|
Author: Agastronics
|
|
7
|
-
Author-email: support@
|
|
7
|
+
Author-email: support@secploy.com
|
|
8
8
|
Classifier: Development Status :: 4 - Beta
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -3,6 +3,8 @@ import logging
|
|
|
3
3
|
from typing import Any, Dict, Optional, List, Union
|
|
4
4
|
import queue
|
|
5
5
|
|
|
6
|
+
from secploy.lib.config import config_to_namespace
|
|
7
|
+
|
|
6
8
|
from .lib import setup_logger, load_config, DEFAULT_CONFIG, secploy_logger
|
|
7
9
|
from .schemas import SecployConfig, LogLevel
|
|
8
10
|
from .log_capture import SecployLogCapturer
|
|
@@ -34,8 +36,9 @@ class SecployClient:
|
|
|
34
36
|
TypeError: If configuration values have invalid types
|
|
35
37
|
"""
|
|
36
38
|
# Load config from file if provided else it will load from default locations or find .secploy
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
config_dict = load_config(config_file)
|
|
40
|
+
config = config_to_namespace(config_dict)
|
|
41
|
+
|
|
39
42
|
if config is None:
|
|
40
43
|
secploy_logger.error("No valid configuration found")
|
|
41
44
|
return
|
|
@@ -11,6 +11,7 @@ import os # For path checks
|
|
|
11
11
|
import glob # For finding config files
|
|
12
12
|
import logging
|
|
13
13
|
from typing import Dict, Optional, Union
|
|
14
|
+
from types import SimpleNamespace
|
|
14
15
|
|
|
15
16
|
logger = logging.getLogger(__name__)
|
|
16
17
|
|
|
@@ -160,6 +161,12 @@ def load_config(file_path: Optional[str] = None) -> Dict[str, Union[str, int, fl
|
|
|
160
161
|
|
|
161
162
|
return config
|
|
162
163
|
|
|
164
|
+
def config_to_namespace(config: Dict[str, Union[str, int, float, bool, None]]) -> SimpleNamespace:
|
|
165
|
+
"""
|
|
166
|
+
Converts a config dict to an object with attribute access.
|
|
167
|
+
"""
|
|
168
|
+
return SimpleNamespace(**config)
|
|
169
|
+
|
|
163
170
|
|
|
164
171
|
def validate_config(config: Dict[str, Union[str, int, float, bool, None]]) -> bool:
|
|
165
172
|
"""
|
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: secploy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: Event tracking and monitoring SDK for Python applications
|
|
5
5
|
Home-page: https://github.com/agastronics/secploy-python-sdk
|
|
6
6
|
Author: Agastronics
|
|
7
|
-
Author-email: support@
|
|
7
|
+
Author-email: support@secploy.com
|
|
8
8
|
Classifier: Development Status :: 4 - Beta
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="secploy",
|
|
5
|
-
version="0.2.
|
|
5
|
+
version="0.2.8",
|
|
6
6
|
packages=find_packages(),
|
|
7
7
|
install_requires=[
|
|
8
8
|
"requests>=2.25.0",
|
|
@@ -10,7 +10,7 @@ setup(
|
|
|
10
10
|
"pydantic>=2.0.0",
|
|
11
11
|
],
|
|
12
12
|
author="Agastronics",
|
|
13
|
-
author_email="support@
|
|
13
|
+
author_email="support@secploy.com",
|
|
14
14
|
description="Event tracking and monitoring SDK for Python applications",
|
|
15
15
|
long_description=open("README.md").read() if open("README.md") else "",
|
|
16
16
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|