--- id: xlocal version: "0.5" license: UNKNOWN license_treatment: unclear maintenance: abandoned --- # xlocal — execution locals: killing global state (including thread locals) License: unclear · Maintenance: abandoned · Downloads: 132.5K/mo ## What it is and what it does xlocal implements execution-local storage—a restricted variant of thread-local storage where attribute bindings are scoped to a context-managed code block and all functions it calls, rather than persisting globally or thread-wide. Attributes set via a with-statement are visible to all code invoked within that block, including nested function calls, but are automatically cleaned up when the block exits and do not leak to other threads or greenlets. The package is designed for frameworks and libraries that invoke handler or plugin code and want to pass execution-specific state without using globals or thread locals. It prevents called code from rebinding state of its caller and ensures clean lifecycle management. However, the package has been abandoned since 2012-11-16 and is not actively maintained. Use it for: - Pass request-specific context to handler functions spawned in threads or greenlets without using globals. - Implement per-execution state in web frameworks or plugin systems where multiple concurrent executions need isolated bindings. - Prevent state leakage when invoking user code that should not modify the caller's execution context. - Manage thread-local or greenlet-local state with explicit lifecycle control via context managers. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides execution-local storage that scopes attribute bindings to a code block and its callees, preventing state leakage across threads or greenlets. No. The package is abandoned (last release 2012-11-16, no maintenance since), has unclear licensing, high install friction (zip-only distribution), and unspecified Python version support. Modern alternatives provide similar functionality with active maintenance. Use only if maintaining legacy code already depending on it. ## Install pip install xlocal uv add xlocal poetry add xlocal ## Installing xlocal Before you install: High install friction: distributed as a zip file rather than a wheel or sdist. Package is abandoned—last release was 2012-11-16 with no commits or maintenance activity since. Not suitable for new projects. License in practice: License is marked UNKNOWN with no SPDX identifier; actual licensing terms are unclear. Verify the LICENSE file in the source before using in commercial or copyleft-sensitive contexts. Quickstart: from xlocal import xlocal xcurrent = xlocal() with xcurrent(x=1): print(xcurrent.x) # prints 1 # Outside the context, xcurrent.x raises AttributeError Python version support is unspecified; package was last released in 2012 and may not work on modern Python versions. Verify before relying: - Whether xlocal works on current Python versions or only on Python 2.x. - Current compatibility with modern threading or async/await patterns. - Whether the zip distribution includes all necessary files or if setup.py is present. ## Package facts - License: UNKNOWN (unclear) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 132.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags execution local storage, thread-safe context variables, scoped attribute binding, greenlet-safe locals, context manager state isolation, abandoned, legacy [View on SkillFed](https://skillfed.io/packages/xlocal) · [View on PyPI](https://pypi.org/project/xlocal/)