Skip to content

Commit

Permalink
add value classes
Browse files Browse the repository at this point in the history
  • Loading branch information
victorteokw committed Jan 29, 2024
1 parent bb2be5d commit 26c7dcc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ use crate::model::property::property::Property;
use crate::handler::group::HandlerGroup;
use crate::request::HandlerMatch;
use crate::request::ctx::RequestCtx;
use crate::object::value::ObjectId;
use crate::object::value::OptionVariant;
use crate::object::value::File;
use crate::object::value::EnumVariant;
use crate::object::value::Range;
use crate::object::pipeline::Pipeline;

#[pymodule]
fn teo(py: Python, m: &PyModule) -> PyResult<()> {
Expand Down Expand Up @@ -73,5 +79,11 @@ def teo_wrap_async(callable):
m.add_class::<Property>()?;
m.add_class::<HandlerMatch>()?;
m.add_class::<RequestCtx>()?;
m.add_class::<ObjectId>()?;
m.add_class::<File>()?;
m.add_class::<Range>()?;
m.add_class::<OptionVariant>()?;
m.add_class::<EnumVariant>()?;
m.add_class::<Pipeline>()?;
Ok(())
}
2 changes: 1 addition & 1 deletion teo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .teo import App, Namespace, Model, Field, Relation, Property, Enum, EnumMember, Response, Request, ReadOnlyHeaderMap, ReadWriteHeaderMap, HandlerMatch, HandlerGroup, RequestCtx
from .teo import App, Namespace, Model, Field, Relation, Property, Enum, EnumMember, Response, Request, ReadOnlyHeaderMap, ReadWriteHeaderMap, HandlerMatch, HandlerGroup, RequestCtx, ObjectId, Range
from signal import signal, SIGINT
from sys import exit

Expand Down

0 comments on commit 26c7dcc

Please sign in to comment.