Registry / data / pytango

pytango

JSON →
library10.3.0pypypi✓ verified 86d ago

PyTango provides Python bindings for the cppTango library, part of the Tango Distributed Control System (DCS). Current version is 10.1.4, with main releases following cppTango major versions. It enables Python device servers and clients for Tango controls.

pip install pytango
INSTALL
IMPORT
SIG · PYTANGO
P
pytango
datapythonv10.3.0
Install
4.7s avg
Import
496ms
Disk
156MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v10.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.7s · import 0.496s · 152MB
156MB installed
● package 156MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DeviceProxy
from tango import DeviceProxy
Database
from tango import Database
DeviceClass
from tango.server import DeviceClass
from tango import DeviceClass
DeviceClass is in tango.server, not top-level tango.
command
from tango.server import command
from tango import command
Decorator is in tango.server.

Connect to a Tango device, read/write attributes, and execute commands. Assumes a running Tango database and test device.

import tango import os proxy = tango.DeviceProxy("sys/tg_test/1") # Read a scalar attribute print("Attribute value:", proxy.read_attribute("double_scalar").value) # Write an attribute proxy.write_attribute("double_scalar", 3.14) # Execute a command result = proxy.command_inout("DevString", "hello") print("Command result:", result)
Debug
Known issues
breakingPyTango 10.x requires Python >=3.10, dropping support for older Python versions.
fix
Upgrade to Python 3.10+ or use PyTango 9.x (but 9.x is deprecated).
affects: >=10.0.0
breakingIn PyTango 10, the 'tango' module no longer imports 'DeviceClass' at top level; it moved to 'tango.server'. Code using 'from tango import DeviceClass' will break.
fix
Change import to 'from tango.server import DeviceClass'.
affects: >=10.0.0
gotchaEvent subscription callbacks are called from a separate thread, causing potential concurrency issues if not handled properly (e.g., updating GUI).
fix
Use thread-safe queues or locking mechanisms when updating shared state from event callbacks.
affects: all
gotchaMany users try to install pytango via pip without installing cppTango first, leading to compilation errors.
fix
Install cppTango using conda (conda install -c conda-forge cpptango) or system package before pip install.
affects: all
deprecatedThe 'tango.utils' module is deprecated and may be removed in a future version.
fix
Replace uses with standard Python utilities or tango built-ins.
affects: >=10.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tango'
PyTango is not installed or not in the Python path.
fix
Run 'pip install pytango' (or 'conda install -c conda-forge pytango'). Ensure virtual environment is activated.
ImportError: libtango.so: cannot open shared object file: No such file or directory
cppTango shared library is not installed or not in LD_LIBRARY_PATH.
fix
Install cppTango via conda ('conda install -c conda-forge cpptango') or set LD_LIBRARY_PATH to the directory containing libtango.so.
AttributeError: module 'tango' has no attribute 'DeviceClass'
Code uses 'from tango import DeviceClass', which moved to tango.server in v10.
fix
Change import to 'from tango.server import DeviceClass'.
Upgrade
Version history
10.3.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies
cpptangorequiredCore C++ library, required at build time. Must be installed separately (e.g., conda or system package).
numpyrequiredRequired for attribute data handling.
PyYAMLoptionalOften used for configuration files.
Agent activity
10 hits · last 30 days
node
8
Resources
pytango — pip install pytango · libregistry