Skip to content

Commit b916658

Browse files
slowbackspaceclaude
andcommitted
fix: use @request_wrapper for all non-paginated list endpoints
Switch transaction sub-endpoints (stakes, delegations, withdrawals, mirs, pool_updates, pool_retires, metadata, metadata_cbor, redeemers), pool_relays, and metrics endpoints from @list_request_wrapper to @request_wrapper since they are not paginated. Also align python_requires and classifiers with CI matrix (3.10, 3.12, 3.13). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2ed756f commit b916658

4 files changed

Lines changed: 17 additions & 18 deletions

File tree

blockfrost/api/cardano/pools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def pool_metadata(self, pool_id: str, **kwargs):
179179
)
180180

181181

182-
@list_request_wrapper
182+
@request_wrapper
183183
def pool_relays(self, pool_id: str, **kwargs):
184184
"""
185185
Relays of a stake pool.

blockfrost/api/cardano/transactions.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import requests
22
from typing import Union
3-
from blockfrost.utils import request_wrapper, list_request_wrapper
3+
from blockfrost.utils import request_wrapper
44

55

66
@request_wrapper
@@ -47,7 +47,7 @@ def transaction_utxos(self, hash: str, **kwargs):
4747
)
4848

4949

50-
@list_request_wrapper
50+
@request_wrapper
5151
def transaction_stakes(self, hash: str, **kwargs):
5252
"""
5353
Obtain information about (de)registration of stake addresses within a transaction.
@@ -69,7 +69,7 @@ def transaction_stakes(self, hash: str, **kwargs):
6969
)
7070

7171

72-
@list_request_wrapper
72+
@request_wrapper
7373
def transaction_delegations(self, hash: str, **kwargs):
7474
"""
7575
Obtain information about delegation certificates of a specific transaction.
@@ -91,7 +91,7 @@ def transaction_delegations(self, hash: str, **kwargs):
9191
)
9292

9393

94-
@list_request_wrapper
94+
@request_wrapper
9595
def transaction_withdrawals(self, hash: str, **kwargs):
9696
"""
9797
Obtain information about withdrawals of a specific transaction.
@@ -113,7 +113,7 @@ def transaction_withdrawals(self, hash: str, **kwargs):
113113
)
114114

115115

116-
@list_request_wrapper
116+
@request_wrapper
117117
def transaction_mirs(self, hash: str, **kwargs):
118118
"""
119119
Obtain information about Move Instantaneous Rewards (MIRs) of a specific transaction.
@@ -135,7 +135,7 @@ def transaction_mirs(self, hash: str, **kwargs):
135135
)
136136

137137

138-
@list_request_wrapper
138+
@request_wrapper
139139
def transaction_pool_updates(self, hash: str, **kwargs):
140140
"""
141141
Obtain information about stake pool registration and update certificates of a specific transaction.
@@ -157,7 +157,7 @@ def transaction_pool_updates(self, hash: str, **kwargs):
157157
)
158158

159159

160-
@list_request_wrapper
160+
@request_wrapper
161161
def transaction_pool_retires(self, hash: str, **kwargs):
162162
"""
163163
Obtain information about stake pool retirements within a specific transaction.
@@ -179,7 +179,7 @@ def transaction_pool_retires(self, hash: str, **kwargs):
179179
)
180180

181181

182-
@list_request_wrapper
182+
@request_wrapper
183183
def transaction_metadata(self, hash: str, **kwargs):
184184
"""
185185
Obtain the transaction metadata.
@@ -201,7 +201,7 @@ def transaction_metadata(self, hash: str, **kwargs):
201201
)
202202

203203

204-
@list_request_wrapper
204+
@request_wrapper
205205
def transaction_metadata_cbor(self, hash: str, **kwargs):
206206
"""
207207
Obtain the transaction metadata in CBOR.
@@ -223,7 +223,7 @@ def transaction_metadata_cbor(self, hash: str, **kwargs):
223223
)
224224

225225

226-
@list_request_wrapper
226+
@request_wrapper
227227
def transaction_redeemers(self, hash: str, **kwargs):
228228
"""
229229
Obtain the transaction redeemers.

blockfrost/api/metrics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import requests
22
from dataclasses import dataclass
3-
from ..utils import list_request_wrapper
3+
from ..utils import request_wrapper
44

55

6-
@list_request_wrapper
6+
@request_wrapper
77
def metrics(self, **kwargs):
88
"""
99
History of your Blockfrost usage metrics in the past 30 days.
@@ -23,7 +23,7 @@ def metrics(self, **kwargs):
2323
)
2424

2525

26-
@list_request_wrapper
26+
@request_wrapper
2727
def metrics_endpoints(self, **kwargs):
2828
"""
2929
History of your Blockfrost usage metrics per endpoint in the past 30 days.

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
license='Apache-2.0',
2121
keywords='blockfrost blockchain cardano ipfs',
2222
packages=find_packages(exclude=['tests', 'tests.*']),
23-
python_requires='>=3.7, <4',
23+
python_requires='>=3.10, <4',
2424
requires=[
2525
"importlib_metadata",
2626
],
@@ -48,10 +48,9 @@
4848
'License :: OSI Approved :: Apache Software License',
4949

5050
'Programming Language :: Python :: 3',
51-
'Programming Language :: Python :: 3.7',
52-
'Programming Language :: Python :: 3.8',
53-
'Programming Language :: Python :: 3.9',
5451
'Programming Language :: Python :: 3.10',
52+
'Programming Language :: Python :: 3.12',
53+
'Programming Language :: Python :: 3.13',
5554
'Programming Language :: Python :: 3 :: Only',
5655
],
5756
)

0 commit comments

Comments
 (0)