JetStream(socket_interface=<class 'jetstream.socketinterface.SocketInterface'>, logging_interface=<class 'jetstream.logginginterface.LoggingInterface'>, sync_interface=<class 'jetstream.syncinterface.SyncInterface'>)¶
JetStreamclass serves as an API interface factory. Use this to instantiate an interface that may be used to issue commands to a JetStream server.
Note that this factory, on its own, does not connect to a JetStream server, nor issue commands. You use the returned interfaces to connect and issue commands.
jetstream = JetStream() # Instantiate an API interface. api = jetstream.api(serverAddress, serverPort) # Connect with api: # Issue commands. api.server.getServerInfo() api.send.createManifest(...)
||Get an API interface for a JetStream server.|
||Get an API interface that listens for connections from JetStream servers.|
api(serverAddress='localhost', serverPort=8886, timeoutSeconds=10, certificatePath=NULL, sslCertificateRequirements=0)¶
Get an API interface for a JetStream server.
This does not connect to the server. Use the returned interface to connect first, then issue commands.
Timeout functionality is currently unimplemented.
- serverAddress (str) – The address (host name) on which the JetStream server is running.
- serverPort (int) – The control port on which the server is listening.
- timeoutSeconds (float) – A timeout, in seconds, used to terminate blocking commands. If unassigned, blocking commands will never unblock.
- certificatePath (str) – Path to an SSL certificate.
- sslCertificateRequirements (int) – Level of strictness when checking SSL certificates. Can be one of:
An API interface.
api_listen(listenAddress='', listenPort=8886, timeoutSeconds=10, certificatePath=NULL, sslCertificateRequirements=0)¶
Get an API interface that listens for connections from JetStream servers.
This does not listen for connections. Use the returned interface to start listening first, then issue commands