__init__¶
-
BitcoinEmulator.
__init__
(host='', port: int = 8332, background=True)[source]¶ Without any constructor arguments, will fork into background at http://127.0.0.1:8332
By default,
background
is set to True, meaning it will launch as a sub-process, instead of blocking your application.>>> from privex.rpcemulator.bitcoin import BitcoinEmulator >>> >>> with BitcoinEmulator(): ... # make some queries to the RPC at https://127.0.0.1:8332 ... >>> # Once the `with` statement is over, the JsonRPC server automatically shuts down