lokinet/pybind/llarp/service/address.cpp

18 lines
408 B
C++
Raw Normal View History

2020-02-28 16:29:15 +00:00
#include "common.hpp"
#include "service/address.hpp"
namespace llarp
{
namespace service
{
2020-03-07 01:20:11 +00:00
void
Address_Init(py::module& mod)
2020-02-28 16:29:15 +00:00
{
2020-03-07 01:20:11 +00:00
py::class_< Address >(mod, "ServiceAddress")
.def(py::init< std::string >())
.def("__str__", [](const Address& addr) -> std::string {
return addr.ToString();
});
2020-02-28 16:29:15 +00:00
}
2020-03-07 01:20:11 +00:00
} // namespace service
} // namespace llarp