/* @file pywebutil.cpp */ #include "pywebutil.hpp" #include "xo/webutil/HttpEndpointDescr.hpp" #include "xo/webutil/StreamEndpointDescr.hpp" #include "xo/pyutil/pyutil.hpp" #include namespace xo { //using xo::web::Alist; using xo::web::HttpEndpointDescr; using xo::ref::rp; //using xo::time::utc_nanos; namespace py = pybind11; namespace web { PYBIND11_MODULE(PYWEBUTIL_MODULE_NAME(), m) { //PYxxx_IMPORT_MODULE(); /* module docstring */ m.doc() = "pybind11 plugin for xo.web_util"; py::class_(m, "EndpointDescr") .def_property_readonly("uri_pattern", &HttpEndpointDescr::uri_pattern) .def("__repr__", &HttpEndpointDescr::display_string); py::class_(m, "StreamEndpointDescr") .def_property_readonly("uri_pattern", &StreamEndpointDescr::uri_pattern) .def("__repr__", &StreamEndpointDescr::display_string); } /*web*/ } /*namespace web*/ } /*namespace xo*/ /* end pywebutil.cpp */