Skip to content

Commit ea16f58

Browse files
Merge pull request #5 from cardano-apexpool/dependencies_update
Dependencies updates
2 parents b42348e + d98ebaf commit ea16f58

File tree

12 files changed

+48
-34
lines changed

12 files changed

+48
-34
lines changed

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: "Set up Python"
1616
uses: "actions/setup-python@v4"
1717
with:
18-
python-version: "3.10"
18+
python-version: "3.11"
1919
- name: "install linting tooling"
2020
continue-on-error: true
2121
run: |

.github/workflows/unit-tests-all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- os: ubuntu-latest
3131
python-version: "3.11.0"
3232
experimental: true
33-
- os: macos-latest
33+
- os: windows-latest
3434
python-version: "3.11.0"
3535
experimental: true
3636
steps:

requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
codespell==2.2.6
2-
pre-commit==3.3.2
3-
pylint==2.17.4
4-
pytest==7.3.1
5-
tox==4.5.2
6-
requests==2.31.0
1+
codespell==2.3.0
2+
pre-commit==3.7.1
3+
pylint==3.2.3
4+
pytest==8.2.2
5+
tox==4.15.1
6+
requests==2.32.3

src/__init__.py

Whitespace-only changes.

src/koios_api/account.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Account section functions"""
2+
from typing import Union
3+
24
from .library import *
35

46

@@ -30,7 +32,7 @@ def get_account_list(offset: int = 0, limit: int = 0) -> list:
3032
return account_list
3133

3234

33-
def get_account_info(addr: [str, list]) -> list:
35+
def get_account_info(addr: Union[str, list]) -> list:
3436
"""
3537
https://api.koios.rest/#post-/account_info
3638
Get the account information for given stake addresses (accounts)
@@ -46,7 +48,7 @@ def get_account_info(addr: [str, list]) -> list:
4648
return koios_post_request(url, {}, parameters)
4749

4850

49-
def get_account_info_cached(addr: [str, list]) -> list:
51+
def get_account_info_cached(addr: Union[str, list]) -> list:
5052
"""
5153
https://api.koios.rest/#post-/account_info_cached
5254
Get the cached account information for given stake addresses
@@ -64,7 +66,7 @@ def get_account_info_cached(addr: [str, list]) -> list:
6466

6567

6668
def get_account_utxos(
67-
addr: [str, list], extended: bool = False, offset: int = 0, limit: int = 0
69+
addr: Union[str, list], extended: bool = False, offset: int = 0, limit: int = 0
6870
) -> list:
6971
"""
7072
https://api.koios.rest/#get-/account_utxos
@@ -126,7 +128,7 @@ def get_account_txs(addr: str, block_height: int = 0) -> list:
126128
return txs
127129

128130

129-
def get_account_rewards(addr: [str, list], epoch: int = 0) -> list:
131+
def get_account_rewards(addr: Union[str, list], epoch: int = 0) -> list:
130132
"""
131133
https://api.koios.rest/#post-/account_rewards
132134
Get the full rewards history (including MIR) for given stake addresses (accounts)
@@ -146,7 +148,7 @@ def get_account_rewards(addr: [str, list], epoch: int = 0) -> list:
146148
return resp
147149

148150

149-
def get_account_updates(addr: [str, list]) -> list:
151+
def get_account_updates(addr: Union[str, list]) -> list:
150152
"""
151153
https://api.koios.rest/#post-/account_updates
152154
Get the account updates (registration, deregistration, delegation and withdrawals) for given stake addresses
@@ -163,7 +165,7 @@ def get_account_updates(addr: [str, list]) -> list:
163165

164166

165167
def get_account_addresses(
166-
addr: [str, list], first_only: bool = False, empty: bool = True
168+
addr: Union[str, list], first_only: bool = False, empty: bool = True
167169
) -> list:
168170
"""
169171
https://api.koios.rest/#post-/account_addresses
@@ -184,7 +186,7 @@ def get_account_addresses(
184186
return koios_post_request(url, {}, parameters)
185187

186188

187-
def get_account_assets(addr: [str, list]) -> list:
189+
def get_account_assets(addr: Union[str, list]) -> list:
188190
"""
189191
https://api.koios.rest/#post-/account_assets
190192
Get the native asset balance of given accounts
@@ -212,7 +214,7 @@ def get_account_assets(addr: [str, list]) -> list:
212214
return assets
213215

214216

215-
def get_account_history(addr: [str, list], epoch: int = 0) -> list:
217+
def get_account_history(addr: Union[str, list], epoch: int = 0) -> list:
216218
"""
217219
https://api.koios.rest/#post-/account_history
218220
Get the staking history of given stake addresses (accounts)

src/koios_api/address.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
"""Address section functions"""
2+
from typing import Union
3+
24
from .library import *
35

46

5-
def get_address_info(addr: [str, list]) -> list:
7+
def get_address_info(addr: Union[str, list]) -> list:
68
"""
79
https://api.koios.rest/#post-/address_info
810
Get address info - balance, associated stake address (if any) and UTxO set for given addresses
@@ -18,7 +20,7 @@ def get_address_info(addr: [str, list]) -> list:
1820
return koios_post_request(url, {}, parameters)
1921

2022

21-
def get_address_utxos(addr: [str, list], extended: bool = False) -> list:
23+
def get_address_utxos(addr: Union[str, list], extended: bool = False) -> list:
2224
"""
2325
https://api.koios.rest/#post-/address_utxos
2426
Get UTxO set for given addresses
@@ -48,7 +50,7 @@ def get_address_utxos(addr: [str, list], extended: bool = False) -> list:
4850
return utxos
4951

5052

51-
def get_credential_utxos(cred: [str, list], extended: bool = False) -> list:
53+
def get_credential_utxos(cred: Union[str, list], extended: bool = False) -> list:
5254
"""
5355
https://api.koios.rest/#post-/credential_utxos
5456
Get a list of UTxO against input payment credential array including their balances
@@ -78,7 +80,7 @@ def get_credential_utxos(cred: [str, list], extended: bool = False) -> list:
7880
return utxos
7981

8082

81-
def get_address_txs(addr: [str, list], block_height: int = 0) -> list:
83+
def get_address_txs(addr: Union[str, list], block_height: int = 0) -> list:
8284
"""
8385
https://api.koios.rest/#post-/address_txs
8486
Get the transaction hash list of input address array, optionally filtering after specified block height (inclusive)
@@ -109,7 +111,7 @@ def get_address_txs(addr: [str, list], block_height: int = 0) -> list:
109111
return txs
110112

111113

112-
def get_credential_txs(cred: [str, list], block_height: int = 0) -> list:
114+
def get_credential_txs(cred: Union[str, list], block_height: int = 0) -> list:
113115
"""
114116
https://api.koios.rest/#post-/credential_txs
115117
Get the transaction hash list of input payment credential array,
@@ -129,7 +131,7 @@ def get_credential_txs(cred: [str, list], block_height: int = 0) -> list:
129131
return koios_post_request(url, {}, parameters)
130132

131133

132-
def get_address_assets(addr: [str, list]) -> list:
134+
def get_address_assets(addr: Union[str, list]) -> list:
133135
"""
134136
https://api.koios.rest/#post-/address_assets
135137
Get the list of all the assets (policy, name and quantity) for given addresses

src/koios_api/asset.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Asset section functions"""
2+
from typing import Union
3+
24
from .library import *
35

46

@@ -89,7 +91,7 @@ def get_asset_token_registry(logo: bool = True) -> list:
8991
return assets_token_registry
9092

9193

92-
def get_asset_info(assets: [str, list]) -> list:
94+
def get_asset_info(assets: Union[str, list]) -> list:
9395
"""
9496
https://api.koios.rest/#post-/asset_info
9597
Get the information of a list of assets including first minting & token registry metadata
@@ -108,7 +110,7 @@ def get_asset_info(assets: [str, list]) -> list:
108110
return koios_post_request(url, {}, parameters)
109111

110112

111-
def get_asset_utxos(assets: [str, list], extended: bool = False) -> list:
113+
def get_asset_utxos(assets: Union[str, list], extended: bool = False) -> list:
112114
"""
113115
https://api.koios.rest/#post-/asset_utxos
114116
Get the UTXO information of a list of assets

src/koios_api/block.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Block section functions"""
2+
from typing import Union
3+
24
from .library import *
35

46

@@ -31,7 +33,7 @@ def get_blocks(limit: int = 0) -> list:
3133
return blocks
3234

3335

34-
def get_block_info(block: [str, list]) -> list:
36+
def get_block_info(block: Union[str, list]) -> list:
3537
"""
3638
https://api.koios.rest/#post-/block_info
3739
Get detailed information about a specific block
@@ -47,7 +49,7 @@ def get_block_info(block: [str, list]) -> list:
4749
return koios_post_request(url, {}, parameters)
4850

4951

50-
def get_block_txs(block: [str, list]) -> list:
52+
def get_block_txs(block: Union[str, list]) -> list:
5153
"""
5254
https://api.koios.rest/#post-/block_txs
5355
Get a list of all transactions included in provided blocks

src/koios_api/pool.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Pool section functions"""
2+
from typing import Union
3+
24
from .library import *
35

46

@@ -24,7 +26,7 @@ def get_pool_list() -> list:
2426
return pools_list
2527

2628

27-
def get_pool_info(pool_id: [str, list]) -> list:
29+
def get_pool_info(pool_id: Union[str, list]) -> list:
2830
"""
2931
https://api.koios.rest/#post-/pool_info
3032
Current pool statuses and details for a specified list of pool ids

src/koios_api/script.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
"""Script section functions"""
2+
from typing import Union
3+
24
from .library import *
35

46

5-
def get_script_info(script_hashes: [str, list]) -> list:
7+
def get_script_info(script_hashes: Union[str, list]) -> list:
68
"""
79
https://api.koios.rest/#post-/script_info
810
List of datum information for given datum hashes
@@ -101,7 +103,7 @@ def get_script_utxos(script_hash: str, extended: bool = False) -> list:
101103
return utxos
102104

103105

104-
def get_datum_info(datum: [str, list]) -> list:
106+
def get_datum_info(datum: Union[str, list]) -> list:
105107
"""
106108
https://api.koios.rest/#post-/datum_info
107109
List of datum information for given datum hashes

src/koios_api/transactions.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
"""Transactions section functions"""
2+
from typing import Union
3+
24
from .library import *
35

46

5-
def get_utxo_info(utxos: [str, list], extended: bool = False) -> list:
7+
def get_utxo_info(utxos: Union[str, list], extended: bool = False) -> list:
68
"""
79
https://api.koios.rest/#post-/utxo_info
810
Get UTxO set for requested UTxO references
@@ -21,7 +23,7 @@ def get_utxo_info(utxos: [str, list], extended: bool = False) -> list:
2123
return koios_post_request(url, {}, parameters)
2224

2325

24-
def get_tx_info(txs: [str, list]) -> list:
26+
def get_tx_info(txs: Union[str, list]) -> list:
2527
"""
2628
https://api.koios.rest/#post-/tx_info
2729
Get detailed information about transaction(s)
@@ -37,7 +39,7 @@ def get_tx_info(txs: [str, list]) -> list:
3739
return koios_post_request(url, {}, parameters)
3840

3941

40-
def get_tx_metadata(txs: [str, list]) -> list:
42+
def get_tx_metadata(txs: Union[str, list]) -> list:
4143
"""
4244
https://api.koios.rest/#post-/tx_metadata
4345
Get metadata information (if any) for given transaction(s)
@@ -108,7 +110,7 @@ def submit_tx(transaction: str) -> str:
108110
return resp
109111

110112

111-
def get_tx_status(txs: [str, list]) -> list:
113+
def get_tx_status(txs: Union[str, list]) -> list:
112114
"""
113115
https://api.koios.rest/#post-/tx_status
114116
Get the number of block confirmations for a given transaction hash list

tests/test_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from src.koios_api.script import *
44

5-
TEST_SCRIPT = "30b8e7fa4674409240889f955623c187397e7346d276ab2e845d3a25"
5+
TEST_SCRIPT = "2cccc05192920ff1eb02bcfa7bb2a1fc5352ce58391d7ba3c66a555b"
66
TEST_DATUM = "45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0"
77

88

0 commit comments

Comments
 (0)