#!/usr/bin/perl use strict; use warnings; my $client = Wrapper->new(); my @res = $client->get('space','key'); use Inline Python => <<'END_OF_PYTHON' import hyperdex.client class Wrapper: def __init__(self, host='127.0.0.1', port=1982): self.client = hyperdex.client.Client(host,port) def get(self, *args): self.client(get(args[0],args[1]) END_OF_PYTHON #### my $client = Client->new('127.0.0.1',1982); $client->get('space','key'); $client->search('space', { a => b, c => d }); #### my $client = new Client('127.0.0.1',1982); use Inline Python => <<'END_OF_PYTHON' import hyperdex.client as Client END_OF_PYTHON #### my $client = Client->Client('127.0.0.1',1982); #### #!/usr/bin/perl use strict; use warnings; use Inline::Python qw(py_eval py_bind_class); use Data::Dumper; py_eval(<<'END'); from hyperdex.client import Client class MyClient(Client): def placeholder(self): print "Placeholder function" END py_bind_class("main::PerlClient","__main__","MyClient"); my $a = new PerlClient('127.0.0.1',1982); warn Dumper($a->get('space','1234567'));