nebu 0.1.39__py3-none-any.whl → 0.1.40__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.
nebu/cache.py CHANGED
@@ -1,8 +1,10 @@
1
1
  import os
2
+ import socket # Add socket import
2
3
  import time
3
4
  from typing import Any, Optional, cast
4
5
 
5
6
  import redis
7
+ import socks # Add socks import
6
8
  from pydantic import BaseModel, Field
7
9
 
8
10
 
@@ -36,6 +38,19 @@ class Cache:
36
38
  self.redis_client = None
37
39
  connection_info = ""
38
40
 
41
+ # Configure SOCKS proxy before connecting to Redis
42
+ try:
43
+ # Use the proxy settings provided by tailscaled
44
+ socks.set_default_proxy(socks.SOCKS5, "localhost", 1055)
45
+ socket.socket = socks.socksocket
46
+ print("Configured SOCKS5 proxy for socket connections via localhost:1055")
47
+ except Exception as proxy_err:
48
+ print(f"Failed to configure SOCKS proxy: {proxy_err}")
49
+ # Depending on requirements, you might want to raise an error here
50
+ # or proceed without the proxy if it's optional.
51
+ # For now, we'll print the error and continue, but the Redis connection
52
+ # will likely fail if the proxy is required.
53
+
39
54
  try:
40
55
  if redis_url:
41
56
  # Use REDIS_URL if available
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nebu
3
- Version: 0.1.39
3
+ Version: 0.1.40
4
4
  Summary: A globally distributed container runtime
5
5
  Requires-Python: >=3.10.14
6
6
  Description-Content-Type: text/markdown
@@ -1,7 +1,7 @@
1
1
  nebu/__init__.py,sha256=5sepbzdAdoA_8TIxws60S4ugFY1apQd_savzn20a4cY,465
2
2
  nebu/adapter.py,sha256=X9Lc0-pm4U6v7UDgOd_RuxJqENqAO8Si4jrwGYTsMGI,418
3
3
  nebu/auth.py,sha256=N_v6SPFD9HU_UoRDTaouH03g2Hmo9C-xxqInE1FweXE,1471
4
- nebu/cache.py,sha256=nKssfJ4mqkxkzoU776cr7RjOSbKoueqNvmHvQ0Ufj70,3929
4
+ nebu/cache.py,sha256=jmluqvWnE9N8uNq6nppXSxEJK7DKWaB79GicaGg9KmY,4718
5
5
  nebu/config.py,sha256=aZzQltkobtOLHFCGcIkpKoE3ITn3Z11Dp0E72w84TA0,5769
6
6
  nebu/data.py,sha256=kIH9-JJ1-iO7P2t28bku6Gn0Y5tgQszGeTW_rpmO03A,38725
7
7
  nebu/meta.py,sha256=CzFHMND9seuewzq9zNNx9WTr6JvrCBExe7BLqDSr7lM,745
@@ -19,8 +19,8 @@ nebu/processors/processor.py,sha256=068hLQKapWabNlhb_DtzqAJ7N7MGdr5UcjfZrb_MkFo,
19
19
  nebu/processors/remote.py,sha256=TeAIPGEMqnDIb7H1iett26IEZrBlcbPB_-DSm6jcH1E,1285
20
20
  nebu/redis/models.py,sha256=coPovAcVXnOU1Xh_fpJL4PO3QctgK9nBe5QYoqEcnxg,1230
21
21
  nebu/services/service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- nebu-0.1.39.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
23
- nebu-0.1.39.dist-info/METADATA,sha256=aAJh9bd6ya9FoUBkqpxnAsk6T6Vwtwtz6g5hhMl28PY,1786
24
- nebu-0.1.39.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
25
- nebu-0.1.39.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
26
- nebu-0.1.39.dist-info/RECORD,,
22
+ nebu-0.1.40.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
23
+ nebu-0.1.40.dist-info/METADATA,sha256=bYppJEpxIjbq5HgALjImHajrlBkyEp63EuKAp19drHo,1786
24
+ nebu-0.1.40.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
25
+ nebu-0.1.40.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
26
+ nebu-0.1.40.dist-info/RECORD,,
File without changes