Skip to content

Commit 66218b1

Browse files
committed
Restore OgmiosChainBackend and fix docs
1 parent 11dc71f commit 66218b1

File tree

4 files changed

+46
-23
lines changed

4 files changed

+46
-23
lines changed

docs/requirements.txt

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
11
alabaster==0.7.13 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
2+
annotated-types==0.7.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
23
asn1crypto==1.5.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
3-
attrs==23.2.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
4-
babel==2.15.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5-
black==24.4.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
4+
attrs==24.2.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5+
babel==2.16.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
6+
black==24.8.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
67
blinker==1.8.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
78
blockfrost-python==0.5.3 ; python_full_version >= "3.8.1" and python_version < "4"
8-
cachetools==5.3.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
9-
cbor2==5.6.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
10-
certifi==2024.2.2 ; python_full_version >= "3.8.1" and python_version < "4"
9+
cachetools==5.5.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
10+
cardano-tools==2.1.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
11+
cbor2==5.6.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
12+
certifi==2024.8.30 ; python_full_version >= "3.8.1" and python_version < "4"
1113
certvalidator==0.11.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
12-
cffi==1.16.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
14+
cffi==1.17.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
1315
charset-normalizer==3.3.2 ; python_full_version >= "3.8.1" and python_version < "4"
1416
click==8.1.7 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
1517
colorama==0.4.6 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" and (sys_platform == "win32" or platform_system == "Windows")
18+
coloredlogs==15.0.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
1619
cose==0.9.dev8 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
17-
coverage[toml]==7.5.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
18-
cryptography==42.0.7 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
20+
coverage[toml]==7.6.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
21+
cryptography==43.0.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
1922
decorator==5.1.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
2023
docker==7.1.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
2124
docutils==0.19 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
2225
ecdsa==0.19.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
2326
ecpy==1.2.5 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
24-
exceptiongroup==1.2.1 ; python_full_version >= "3.8.1" and python_version < "3.11"
27+
exceptiongroup==1.2.2 ; python_full_version >= "3.8.1" and python_version < "3.11"
2528
execnet==2.1.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
26-
flake8==7.0.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
29+
flake8==7.1.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
2730
flask==2.3.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
2831
frozendict==2.4.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
2932
frozenlist==1.4.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
30-
idna==3.7 ; python_full_version >= "3.8.1" and python_version < "4"
33+
humanfriendly==10.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
34+
idna==3.8 ; python_full_version >= "3.8.1" and python_version < "4"
3135
imagesize==1.4.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
32-
importlib-metadata==7.1.0 ; python_full_version >= "3.8.1" and python_version < "3.10"
36+
importlib-metadata==8.4.0 ; python_full_version >= "3.8.1" and python_version < "3.10"
3337
iniconfig==2.0.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
3438
isort==5.13.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
3539
itsdangerous==2.2.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
@@ -39,21 +43,28 @@ mccabe==0.7.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
3943
mnemonic==0.21 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
4044
mypy-extensions==1.0.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
4145
mypy==1.4.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
46+
ogmios @ git+https://gitlab.com/viperscience/ogmios-python.git@0b713e78839341d92828340a5552ef8dd1c6224b ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
47+
orjson==3.10.7 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
4248
oscrypto==1.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
43-
packaging==24.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
49+
packaging==24.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
4450
pathspec==0.12.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
51+
pexpect==4.9.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
4552
platformdirs==4.2.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
4653
pluggy==1.5.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
4754
pprintpp==0.4.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
55+
ptyprocess==0.7.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
4856
py==1.11.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
49-
pycodestyle==2.11.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
57+
pycodestyle==2.12.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5058
pycparser==2.22 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
59+
pydantic-core==2.20.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
60+
pydantic==2.8.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5161
pyflakes==3.2.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5262
pygments==2.18.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5363
pynacl==1.5.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
64+
pyreadline3==3.4.1 ; sys_platform == "win32" and python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5465
pytest-cov==5.0.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5566
pytest-xdist==3.6.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
56-
pytest==8.2.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
67+
pytest==8.3.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
5768
pytz==2024.1 ; python_full_version >= "3.8.1" and python_version < "3.9"
5869
pywin32==306 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" and sys_platform == "win32"
5970
requests==2.32.3 ; python_full_version >= "3.8.1" and python_version < "4"
@@ -74,8 +85,9 @@ sphinxcontrib-serializinghtml==1.1.5 ; python_full_version >= "3.8.1" and python
7485
tomli==2.0.1 ; python_full_version >= "3.8.1" and python_full_version <= "3.11.0a6"
7586
typeguard==4.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
7687
types-requests==2.31.0.10 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
77-
typing-extensions==4.12.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
78-
urllib3==2.2.1 ; python_full_version >= "3.8.1" and python_version < "4"
88+
typing-extensions==4.12.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
89+
urllib3==2.2.2 ; python_full_version >= "3.8.1" and python_version < "4"
7990
websocket-client==1.8.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
80-
werkzeug==3.0.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
81-
zipp==3.19.1 ; python_full_version >= "3.8.1" and python_version < "3.10"
91+
websockets==13.0.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
92+
werkzeug==3.0.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
93+
zipp==3.20.1 ; python_full_version >= "3.8.1" and python_version < "3.10"

docs/source/api/pycardano.backend.base.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ Backend
1111
:undoc-members:
1212
:show-inheritance:
1313

14-
.. automodule:: pycardano.backend.ogmios
14+
.. automodule:: pycardano.backend.ogmios_v6
15+
:members:
16+
:undoc-members:
17+
:show-inheritance:
18+
19+
.. automodule:: pycardano.backend.ogmios_v5
1520
:members:
1621
:undoc-members:
1722
:show-inheritance:

pycardano/backend/ogmios_v5.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
)
3232
from pycardano.types import JsonDict
3333

34-
__all__ = ["OgmiosV5ChainContext"]
34+
__all__ = ["OgmiosV5ChainContext", "KupoOgmiosV5ChainContext"]
3535

3636

3737
class OgmiosQueryType(str, Enum):
@@ -41,6 +41,7 @@ class OgmiosQueryType(str, Enum):
4141

4242

4343
class OgmiosV5ChainContext(ChainContext):
44+
"""Legacy Ogmios Chain Context for Ogmios v5"""
4445
_ws_url: str
4546
_network: Network
4647
_service_name: str

pycardano/backend/ogmios_v6.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
ALONZO_COINS_PER_UTXO_WORD = 34482
4040
DEFAULT_REFETCH_INTERVAL = 1000
4141

42-
__all__ = ["OgmiosV6ChainContext"]
42+
__all__ = ["OgmiosV6ChainContext", "OgmiosChainContext", "KupoOgmiosV6ChainContext"]
4343

4444

4545
class OgmiosV6ChainContext(ChainContext):
@@ -357,6 +357,11 @@ def _parse_cost_models(self, plutus_cost_models):
357357
return cost_models
358358

359359

360+
class OgmiosChainContext(OgmiosV6ChainContext):
361+
"""An alias of OgmiosV6ChainContext for backwards compatibility."""
362+
pass
363+
364+
360365
def KupoOgmiosV6ChainContext(
361366
host: str,
362367
port: int,

0 commit comments

Comments
 (0)