1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
#![deny(missing_docs)]
// TODO
/*! Jupyter Client
A Rust implementation of the [Jupyter client][jupyter-client].
## Examples
```no_run
extern crate jupyter_client;
# use std::collections::HashMap;
# use std::thread;
use jupyter_client::Client;
use jupyter_client::commands::Command;
# use jupyter_client::Result;
# fn main() -> Result<()> {
let client = Client::existing()?;
// Set up the heartbeat watcher
let hb_receiver = client.heartbeat()?;
thread::spawn(move || {
for _ in hb_receiver {
println!("Received heartbeat from kernel");
}
});
// Spawn an IOPub watcher
let receiver = client.iopub_subscribe()?;
thread::spawn(move || {
for msg in receiver {
println!("Received message from kernel: {:#?}", msg);
}
});
// Command to run
let command = Command::Execute {
code: "a = 10".to_string(),
silent: false,
store_history: true,
user_expressions: HashMap::new(),
allow_stdin: true,
stop_on_error: false,
};
// Run some code on the kernel
let response = client.send_shell_command(command)?;
# Ok(())
# }
```
[jupyter-client]: https://github.com/jupyter/jupyter_client
*/
extern crate chrono;
extern crate dirs;
extern crate failure;
extern crate glob;
extern crate hex;
extern crate hmac;
extern crate log;
extern crate serde;
extern crate serde_derive;
extern crate serde_json;
extern crate sha2;
extern crate uuid;
extern crate zmq;
#[cfg(test)]
extern crate crypto_mac;
#[cfg(test)]
extern crate digest;
#[cfg(test)]
extern crate generic_array;
#[cfg(test)]
#[macro_use]
mod test_helpers;
mod client;
pub mod commands;
mod connection_config;
mod errors;
mod header;
mod metadata;
mod paths;
pub mod responses;
mod signatures;
mod socket;
mod wire;
pub use client::Client;
pub use errors::Result;