FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-bitshares/bitshares/instance.py at develop · super0717/python-bitshares · GitHub
super0717
/
python-bitshares
Public
forked from
ls1280/python-bitshares
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-bitshares
/
bitshares
/
instance.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (18 loc) · 852 Bytes
Breadcrumbs
python-bitshares
/
bitshares
/
instance.py
Copy path
File metadata and controls
24 lines (18 loc) · 852 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import
bitshares
as
bts
_shared_bitshares_instance
=
None
def
shared_bitshares_instance
():
""" This method will initialize ``_shared_bitshares_instance`` and return it.
The purpose of this method is to have offer single default
bitshares instance that can be reused by multiple classes.
"""
global
_shared_bitshares_instance
if
not
_shared_bitshares_instance
:
_shared_bitshares_instance
=
bts
.
BitShares
()
return
_shared_bitshares_instance
def
set_shared_bitshares_instance
(
bitshares_instance
):
""" This method allows us to override default bitshares instance for all users of
``_shared_bitshares_instance``.
:param bitshares.bitshares.BitShares bitshares_instance: BitShares instance
"""
global
_shared_bitshares_instance
_shared_bitshares_instance
=
bitshares_instance
Back
|
FazBrowse Home
|
New Git URL