File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from enum import Enum
2- import pkg_resources
3-
2+ try :
3+ from importlib .metadata import version
4+ except ImportError : # for Python<3.8
5+ from importlib_metadata import version
46
57class ApiUrls (Enum ):
68 mainnet = 'https://cardano-mainnet.blockfrost.io/api'
@@ -18,4 +20,5 @@ class ApiUrls(Enum):
1820ADDRESS_GAP_LIMIT = 20
1921
2022package_name = 'blockfrost-python'
21- USER_AGENT = f'{ package_name } { pkg_resources .get_distribution (package_name ).version } '
23+ version = version (package_name )
24+ USER_AGENT = f'{ package_name } { version } '
Original file line number Diff line number Diff line change 2121 keywords = 'blockfrost blockchain cardano ipfs' ,
2222 packages = find_packages (exclude = ['tests' , 'tests.*' ]),
2323 python_requires = '>=3.7, <4' ,
24+ requires = [
25+ "importlib_metadata" ,
26+ ],
2427 install_requires = [
2528 "requests" ,
2629 ],
You can’t perform that action at this time.
0 commit comments