lia-web (renamed to cross-web)
The `lia-web` package has been renamed to `cross-web`. This entry describes `cross-web`, which provides a unified, framework-agnostic interface for common web framework operations, allowing developers to write code that can easily adapt to various Python web frameworks like FastAPI, Flask, and Django. It is currently in early development. The latest version of `cross-web` is 0.4.1, released on January 9, 2026.
Warnings
- breaking The `lia-web` package has been renamed to `cross-web`. Users should migrate to `cross-web` as `lia-web` is no longer maintained and installs an older, deprecated version. Functionality and APIs may differ significantly.
- gotcha The `cross-web` library is in early development. This implies that APIs, functionality, and stability may change frequently without strict backward compatibility guarantees.
- gotcha Avoid using mutable objects (like lists or dictionaries) as default arguments in function definitions within `cross-web` callbacks or extensions. This can lead to unexpected state sharing and bugs across multiple function calls.
Install
-
pip install cross-web -
pip install lia-web # This package is deprecated and will install an old version.
Imports
- CrossAdapter
from crossweb import CrossAdapter
Quickstart
import os
from crossweb import CrossAdapter
# Placeholder for framework-agnostic application setup
# In a real scenario, this would integrate with a specific web framework (e.g., Flask, FastAPI)
# and CrossAdapter would provide utilities.
# Example: Initialize an adapter (inferred usage)
try:
app_adapter = CrossAdapter()
print("CrossAdapter initialized successfully.")
# Example of a generic operation (inferred)
# This part is highly speculative without official code examples.
# print(app_adapter.get_current_request_context())
except ImportError:
print("crossweb library not found. Please install with 'pip install cross-web'.")
except Exception as e:
print(f"An error occurred during CrossAdapter initialization: {e}")