web3-multi-provider 2.2.0__tar.gz → 2.2.1__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.
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/PKG-INFO +1 -1
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/pyproject.toml +1 -1
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/util.py +6 -7
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/LICENSE +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/README.md +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/__init__.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/async_http_provider_proxy.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/async_multi_http_provider.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/cl_client_proxy.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/exceptions.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/http_provider_proxy.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/http_session_manager_proxy.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/metrics.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/metrics_decorator.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/multi_http_provider.py +0 -0
- {web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: web3-multi-provider
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: Web3py provider that makes it easy to switch between different blockchain nodes to make sure application will be be online if main blockchain node will be unavailable.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Raman
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "web3-multi-provider"
|
|
3
|
-
version = "2.2.
|
|
3
|
+
version = "2.2.1"
|
|
4
4
|
description = "Web3py provider that makes it easy to switch between different blockchain nodes to make sure application will be be online if main blockchain node will be unavailable."
|
|
5
5
|
authors = ["Raman <raman.s@lido.fi>"]
|
|
6
6
|
license = "MIT License"
|
|
@@ -31,15 +31,14 @@ def normalize_provider(uri: str) -> str:
|
|
|
31
31
|
If uri is an IP address returns as is.
|
|
32
32
|
If uri is a dns address returns two highest domains.
|
|
33
33
|
"""
|
|
34
|
-
|
|
34
|
+
stripped = re.sub(r'^https?://', '', uri.strip().lower())
|
|
35
|
+
host = stripped.split('/')[0]
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return uri
|
|
37
|
+
if re.match(r'^((\d{1,3}\.){3}\d{1,3}|localhost)(:\d+)?$', host):
|
|
38
|
+
return host
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
parts = hostname.split('.')
|
|
40
|
+
parts = host.split('.')
|
|
42
41
|
if len(parts) >= 2:
|
|
43
42
|
return '.'.join(parts[-2:])
|
|
44
43
|
|
|
45
|
-
raise ValueError(f
|
|
44
|
+
raise ValueError(f"Unhandled hostname format: {uri!r}. Hostname must be either an IP address or a valid provider address.")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/cl_client_proxy.py
RENAMED
|
File without changes
|
|
File without changes
|
{web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/http_provider_proxy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/metrics_decorator.py
RENAMED
|
File without changes
|
{web3_multi_provider-2.2.0 → web3_multi_provider-2.2.1}/web3_multi_provider/multi_http_provider.py
RENAMED
|
File without changes
|
|
File without changes
|