mirror of https://github.com/nucypher/nucypher.git
Simple script to run a single demo Ursula.
parent
e3810bcfa8
commit
e94e20397c
|
@ -0,0 +1,23 @@
|
|||
from click.testing import CliRunner
|
||||
from nucypher.cli.main import nucypher_cli
|
||||
import sys
|
||||
|
||||
from nucypher.utilities.sandbox.constants import select_test_port
|
||||
|
||||
click_runner = CliRunner()
|
||||
|
||||
port = select_test_port()
|
||||
|
||||
try:
|
||||
learner_port = sys.argv[1]
|
||||
except IndexError:
|
||||
learner_port = None
|
||||
|
||||
args = ['ursula', 'run',
|
||||
'--federated-only', '--rest-port', port,
|
||||
'--dev', '--debug']
|
||||
|
||||
if learner_port:
|
||||
args.extend(['--teacher-uri', 'https://127.0.0.1:{}'.format(int(learner_port))])
|
||||
|
||||
nucypher_cli.main(args=args or (), prog_name="nucypher-cli")
|
Loading…
Reference in New Issue