Jetstream¶
-
class
jetstream.api.
Jetstream
(socket_interface=<class 'jetstream.socketinterface.SocketInterface'>, logging_interface=<class 'jetstream.logginginterface.LoggingInterface'>, sync_interface=<class 'jetstream.syncinterface.SyncInterface'>)¶ The
Jetstream
class 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.
Example
jetstream = Jetstream() # Instantiate an API interface. api = jetstream.api(serverAddress, serverPort) # Connect with api: # Issue commands. api.server.getServerInfo() api.send.createManifest(...)
Method Summary¶
api |
Get an API interface for a Jetstream server. |
api_listen |
Get an API interface that listens for connections from Jetstream servers. |
Method Documentation¶
-
Jetstream.
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.
Note
Timeout functionality is currently unimplemented.
Parameters: - 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:
ssl.CERT_NONE
(0),ssl.CERT_OPTIONAL
(1), orssl.CERT_REQUIRED
(2).
Returns: An API interface.
Return type:
-
Jetstream.
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
See
api()
for details.