Skip to main content

Temi Python API

(Unofficial) Python library for remote-controlling the Temi robot, via WebSocket.

A corresponding server needs to be installed on Temi. You can find it here.

Installation

pip install temi

Usage

Basics

This library uses asyncio to perform the operations. The minimum structure is as follows:

import asyncio
from temi import Temi

async def connect_temi():
    temi = Temi('ws://YOUR_TEMI_IP:8175')
    await temi.connect()
    await temi.speak(sentence='Hello!').run()

asyncio.get_event_loop().run_until_complete(connect_temi())

Note that each call needs to be await-ed, and must end with a run().

Sending multiple commands at once

Sometimes, you need temi to do multiple things at once, while other times you may want Temi to do things sequentially. It is easy to mix both in you code. Just do it like such:

# Temi will go to the door, uttering "I hear someone at the door" along the way.
# When Temi arrives, it will ask the question "Hello! What's your name?"
await temi.speak(sentence='I hear someone at the door.').goto(location='Front Door').run()
await temi.ask(sentence="Hello! What's your name?").run()

Timeout

All commands support a timeout parameter. If it is specified, the await will terminate after the timeout, regardless of execution state.

# The call will return after three seconds, regardless of Temi's location.
# Temi may continue walking to the door, but you can command it to stop in the following code.
await temi.goto(location='Front Door', timeout=3).run()

API

Currently, the following APIs are implemented:

# Speak a sentence.
await temi.speak(sentence="Sentence to say", timeout=None).run()

# Ask a question, then return the reply.
reply = await temi.ask(sentence="Question to ask", timeout=None).run()

# Go to a location
await temi.goto(location="Location name", timeout=None).run()

# Turn by an angle
await temi.turn(angle=angle, timeout=None).run()

# Tilt screen to an angle (-25 ~ 55)
await temi.turn(angle=angle, timeout=None).run()

Metadata

Release files for temi 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for temi 0.0.2
File Size Uploaded Provenance Actions
temi-0.0.2.tar.gz 4.8 kB Without provenance Details for temi-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for temi 0.0.2
File Interpreter ABI Platform Actions
temi-0.0.2-py3-none-any.whl Python 3 none any Details for temi-0.0.2-py3-none-any.whl

Total release size: 9.7 kB

Release files / temi-0.0.2.tar.gz

Download URL temi-0.0.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a94aec0399de410976a6134e4d13a95607c6a4bd764e0ceb7c96bbb8aa9b972a
BLAKE2b-256 checksum
How to use checksums
d27032155da32ca5fe468d4ae13cb0f55bc7ec34d07d87c48b8b59dae6977141
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.8

Release files / temi-0.0.2-py3-none-any.whl

Download URL temi-0.0.2-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1d5f2b0aa20991fb883a78a2010b379fbd56733c9b8ff3ce1d487fef6244263
BLAKE2b-256 checksum
How to use checksums
bd2c56ffe10d79d704c0f47c3c3324f575f8b239ff86009ac006504a8038975a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.8

Security for temi 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page