qi.Session API

Introduction

A session connect to a standalone qi.Session. Once connected the session can:

  • advertise new services using qi.Session.registerService()
  • get services using qi.Session.service()

Reference

class qi.Session

Examples

Getting a service:

import qi

s = qi.Session()
s.connect("tcp://127.0.0.1:9559")

foo = s.service("foo")

Registering a service:

import qi

#sample service doing nothing
class Foo:
  pass

s = qi.Session()
s.connect("tcp://127.0.0.1:9559")

serviceId = s.registerService("Foo", Foo())