skillfed

xlib

Python X Library

xlib v0.21 160.5K downloads/30d#10,660 on PyPI462
Copyleft license LGPLv2+ Abandoned released

What it is and what it does

Xlib is a pure-Python implementation of an X11 client library, allowing Python programs to communicate directly with X servers via the X protocol over TCP/IP or Unix sockets. Unlike C-based X libraries, it requires no compiled extensions and runs on any system with Python installed. It provides both low-level protocol access and a high-level object-oriented interface for building GUI applications and window managers.

The library implements the complete X11R6 client-side protocol and includes support for several X extensions (RECORD, SHAPE, Xinerama, Composite, RANDR, XTEST). However, the package has been abandoned since 2018, with no releases or active maintenance for over six years, though the repository remains publicly available. It is stable enough to have powered real applications like the PLWM window manager, but users should expect no bug fixes or compatibility updates for modern Python or X11 environments.

Use it for:

  • Build custom window managers or X11 desktop tools that need direct protocol-level control over windows and events.
  • Write GUI automation or testing tools that interact with X11 applications without relying on external C libraries.
  • Develop X11-based system utilities or monitoring applications that need to query or manipulate window state.
  • Create portable X client applications that run on any Unix-like system with Python and X11 installed.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a pure-Python X11 client library for communicating with X servers via the X protocol, enabling GUI applications to interact with X11 window systems.

No, unless you are maintaining legacy code that already depends on it. The package is abandoned (last release 2018, no maintenance since), has no known security vulnerabilities but also no path to fixes, and is untested with Python versions beyond 3.6. For new X11 projects, consider alternatives or direct protocol libraries. If you must use it, treat it as a frozen dependency and test thoroughly in your target environment.

Install

xlib on PyPI

pip

pip install xlib

uv

uv add xlib

poetry

poetry add xlib

Installing xlib

Before you install

Low friction to install, but the package is abandoned as of 2018 with no recent maintenance activity. The last commit was 2023-04-01, but the latest release remains from 2018-01-02. Only one runtime dependency (six) keeps installation simple.

License in practice

Licensed under LGPLv2+, a copyleft license. Any derivative work or modification must be released under compatible terms; static linking or bundling may trigger disclosure obligations depending on your distribution model.

Quickstart

pip install xlib
import Xlib
from Xlib import display
display.Display()

Requires an X11 server to connect to; will not function on systems without X11 (e.g., headless servers, Windows without WSL/X11 forwarding, or macOS without XQuartz).

Verify before relying

  • Whether the package works reliably with Python versions beyond 3.6, given the last release was 2018 and classifiers only list up to 3.6.
  • Current stability and compatibility with modern X11 server implementations, given the abandoned maintenance status.
  • Whether the RECORD, SHAPE, Xinerama, Composite, RANDR, and XTEST extensions mentioned in the description are fully functional or partially implemented.

Package facts

License LGPLv2+ (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — six
Maintenance abandoned — 3,146 days since the last release
Last repo commit
First released
Downloads 160,475/month — #10,660 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: xlib-0.21-py2.py3-none-any.whl

Keywords: windows, x, x11, xlib

Development Status :: 5 - Production/StableEnvironment :: X11 ApplicationsIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Operating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: User Interfaces

Tags

x11 client library pythonx protocol pythonxlib python bindingsx server communicationgui programming x11window manager pythonx11 window control
x11-guilegacy-unmaintainedprotocol-client

More Libraries packages