drifTech-lib 0.4.0__tar.gz → 0.4.2__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.
Potentially problematic release.
This version of drifTech-lib might be problematic. Click here for more details.
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/PKG-INFO +1 -1
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/pyproject.toml +1 -1
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/pyproject.toml.orig +1 -1
- driftech_lib-0.4.2/src/driftech_lib/__init__.py +2 -0
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/src/driftech_lib/db.py +4 -3
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/src/driftech_lib/ipc/client.py +4 -3
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/src/driftech_lib/ipc/server.py +5 -7
- driftech_lib-0.4.0/src/driftech_lib/__init__.py +0 -2
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/LICENSE +0 -0
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/README.md +0 -0
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/src/driftech_lib/ipc/__init__.py +0 -0
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/src/driftech_lib/jsonIO.py +0 -0
- {driftech_lib-0.4.0 → driftech_lib-0.4.2}/src/driftech_lib/logging.py +0 -0
|
@@ -8,7 +8,7 @@ build-backend = "uv_build"
|
|
|
8
8
|
|
|
9
9
|
[project]
|
|
10
10
|
name = "drifTech-lib"
|
|
11
|
-
version = "0.4.
|
|
11
|
+
version = "0.4.2"
|
|
12
12
|
authors = [{name = "driftbluestone", email = "driftbluestone@gmail.com"}]
|
|
13
13
|
description = "Common files/functions across most drifTech software"
|
|
14
14
|
readme = "README.md"
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Module for interacting with PostgreSQL
|
|
3
3
|
"""
|
|
4
|
-
import psycopg
|
|
4
|
+
import psycopg
|
|
5
5
|
from typing import Any
|
|
6
6
|
from psycopg import sql
|
|
7
|
-
|
|
7
|
+
from . import logging
|
|
8
|
+
logger = logging.Logger("db")
|
|
8
9
|
|
|
9
|
-
__all__ = ["SCHEMA", "start", "run", "single", "multiple", "insert", "delete", "get", "table"]
|
|
10
|
+
__all__ = ["SCHEMA", "start", "run", "single", "multiple", "insert", "delete", "get", "table", "logger"]
|
|
10
11
|
|
|
11
12
|
SCHEMA: sql.Identifier = None
|
|
12
13
|
cursor: psycopg.Cursor = None
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
__all__ = ["Server", "connections"]
|
|
1
|
+
import asyncio
|
|
2
|
+
from .. import logging
|
|
3
|
+
logger = logging.Logger("ipc/server")
|
|
4
|
+
__all__ = ["Server", "connections", "logger"]
|
|
5
5
|
Port = int
|
|
6
6
|
|
|
7
7
|
conn_count = 1
|
|
@@ -69,7 +69,7 @@ class Server:
|
|
|
69
69
|
except Exception as e:
|
|
70
70
|
logger.error(f"[ERROR] Reading error: {e}")
|
|
71
71
|
|
|
72
|
-
async def on_message(self):
|
|
72
|
+
async def on_message(self, message: bytes):
|
|
73
73
|
"""Override this function."""
|
|
74
74
|
pass
|
|
75
75
|
|
|
@@ -96,5 +96,3 @@ class Server:
|
|
|
96
96
|
|
|
97
97
|
except Exception as e:
|
|
98
98
|
logger.error(f"Writing error: {e}")
|
|
99
|
-
|
|
100
|
-
asyncio.run(Server().start())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|