Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 3c94e2d

Browse files
committed
Rename sdk class to ThirdwebSdk, create named alias for NftlabsSdk for backwards compatibility. Mirror the thirdweb package with a 'nftlabs' package for backwards compatibility.
1 parent 05ffe53 commit 3c94e2d

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

nftlabs/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import sys
2+
3+
# make sure bar is in sys.modules
4+
import thirdweb
5+
# link this module to bar
6+
sys.modules[__name__] = sys.modules['thirdweb']
7+
8+
# Or simply
9+
sys.modules[__name__] = __import__('thirdweb')

thirdweb/__init__.py

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

33
from .options import *
44

5-
from .sdk import NftlabsSdk
5+
from .sdk import NftlabsSdk, ThirdwebSdk

thirdweb/sdk.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def wrapper(self, *args, **kwargs):
2222
return wrapper
2323

2424

25-
class NftlabsSdk(object):
25+
class ThirdwebSdk(object):
2626
client: Web3
2727
options: SdkOptions
2828

@@ -39,7 +39,7 @@ class NftlabsSdk(object):
3939
__market_module: Optional[MarketModule]
4040

4141
"""
42-
Create instance of the NftlabsSdk
42+
Create instance of the ThirdwebSdk
4343
"""
4444

4545
def __init__(self, options: SdkOptions, url: str):
@@ -180,3 +180,6 @@ def __init_module(self, module):
180180
module.get_signer_address = self.__get_signer_address
181181
module.get_private_key = self.__get_private_key
182182
module.get_transact_opts = self.__get_transact_ops
183+
184+
185+
NftlabsSdk = ThirdwebSdk

0 commit comments

Comments
 (0)