Browse Source

Merge pull request #570 from dora-rs/derive-pyo3-special-method-for-node

tags/v0.3.5
Haixuan Xavier Tao GitHub 1 year ago
parent
commit
054ef593e3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      apis/python/node/src/lib.rs

+ 3
- 2
apis/python/node/src/lib.rs View File

@@ -12,7 +12,7 @@ use eyre::Context;
use futures::{Stream, StreamExt};
use pyo3::prelude::*;
use pyo3::types::{PyBytes, PyDict};
use pyo3_special_method_derive::Dir;
use pyo3_special_method_derive::{Dict, Dir, Repr, Str};

/// The custom node API lets you integrate `dora` into your application.
/// It allows you to retrieve input and send output in any fashion you want.
@@ -27,9 +27,10 @@ use pyo3_special_method_derive::Dir;
///
/// :type node_id: str, optional
#[pyclass]
#[derive(Dir)]
#[derive(Dir, Dict, Str, Repr)]
pub struct Node {
events: Events,
#[pyo3_smd(skip)]
pub node: DoraNode,
}



Loading…
Cancel
Save