kgdata 4.0.1

Library to process dumps of knowledge graphs (Wikipedia, DBpedia, Wikidata)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use pyo3::prelude::*;

use crate::models::DataType;

// use crate::models::MultiLingualString;

// impl<'t> FromPyObject<'t> for MultiLingualString {
//     fn extract(ob: &'t PyAny) -> PyResult<Self> {
//         Ok(Self(unsafe_update_view_lifetime_signature(ob.extract()?)))
//     }
// }

impl IntoPy<PyObject> for &DataType {
    fn into_py(self, py: Python) -> PyObject {
        self.to_str().into_py(py)
    }
}