mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-21 14:54:49 +01:00
add python glue
This commit is contained in:
parent
37347311fb
commit
0ffcef360b
1 changed files with 6 additions and 0 deletions
|
@ -132,6 +132,11 @@ impl Driver {
|
|||
}
|
||||
}
|
||||
|
||||
#[pyfunction]
|
||||
fn version() -> String {
|
||||
crate::version()
|
||||
}
|
||||
|
||||
#[pyfunction]
|
||||
fn init() -> PyResult<Driver> {
|
||||
let (rt_stop_tx, mut rt_stop_rx) = oneshot::channel::<()>();
|
||||
|
@ -257,6 +262,7 @@ impl IntoPy<PyObject> for crate::api::User {
|
|||
|
||||
#[pymodule]
|
||||
fn codemp(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
||||
m.add_function(wrap_pyfunction!(version, m)?)?;
|
||||
m.add_function(wrap_pyfunction!(init, m)?)?;
|
||||
m.add_function(wrap_pyfunction!(get_default_config, m)?)?;
|
||||
m.add_function(wrap_pyfunction!(connect, m)?)?;
|
||||
|
|
Loading…
Reference in a new issue