Skip to content

Commit

Permalink
docs: update readme with REPL desc
Browse files Browse the repository at this point in the history
  • Loading branch information
realvarx committed Jul 13, 2023
1 parent cc02c88 commit f378120
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,20 @@ There are 3 ways in which data can be sent and received from at server.
print(response)

```



### CLI Tools
* **REPL** - you can use this to type atPlatform commands and see responses; but the best thing about the REPL currently is that it shows the data notifications as they are received. The REPL code has the essentials of what a 'receiving' client needs to do - i.e.
* create an AtClient (assigning a Queue object to its queue parameter)
* start two new threads
* one for the AtClient.start_monitor() task: receives data update/delete notification events (the event data contains the ciphertext)
* the other one calls handle_event() method, which will read the upcoming events in the queue and handle them:
* calling AtClient.handle_event() (to decrypt the notifications and introducing the result as a new event in the queue)
* reading the new event, which contains the decrypted result
* Instructions to run the REPL:
1) Run repl.py and choose an atSign using option `1`
2) Select option `2`. REPL will start and activate monitor mode automatically in a different thread. You can still send commands/verbs. You will start seeing your own notifications (from yourself to yourself) and heartbeat working (noop verb is sent from time to time as a keepalive)
3) Use `at_talk` or any other tool to send notifications to your atSign from a different atSign. You should be able to see the complete notification, and the encrypted and decrypted value of it.

## Open source usage and contributions

Expand Down

0 comments on commit f378120

Please sign in to comment.