Simple script to run a single demo Ursula.

pull/638/head
jMyles 2018-12-19 19:56:54 -05:00 committed by Kieran Prasch
parent e3810bcfa8
commit e94e20397c
No known key found for this signature in database
GPG Key ID: 199AB839D4125A62
1 changed files with 23 additions and 0 deletions

View File

@ -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")