nyx_space/io/python.rs
1use super::ExportCfg;
2use pyo3::prelude::*;
3
4#[pymethods]
5impl ExportCfg {
6 #[new]
7 fn py_new(timestamped: Option<bool>) -> Self {
8 if timestamped.unwrap_or_default() {
9 Self::default()
10 } else {
11 Self::timestamped()
12 }
13 }
14
15 fn __str__(&self) -> String {
16 format!("{self:?}")
17 }
18
19 fn __repr__(&self) -> String {
20 format!("{self:?} @ {self:p}")
21 }
22}