Registry / web-framework / cross-web

cross-web

JSON →
library0.7.0pypypi✓ verified 29d ago

Cross-web is a Python library (version 0.4.1) providing a unified interface for common web framework operations, allowing developers to write framework-agnostic code for popular Python web frameworks like FastAPI, Flask, and Django. It is actively developed with recent releases addressing bug fixes and framework support, and was last updated in January 2026.

pip install cross-web
INSTALL
IMPORT
SIG · CROSS-WEB
C
cross-web
web-frameworkpythonv0.7.0
Install
1.6s avg
Import
71ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.7.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.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.072s · 18.4MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.070s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

Response
✓ from cross_web import Response
✗ from lia_web import Response
The package was renamed from `lia-web` to `cross-web` in version 0.4.0. While `lia-web` acts as a compatibility shim, direct imports from `cross_web` are recommended.
Request
✓ from cross_web import Request

This quickstart demonstrates the core concept of `cross-web`: defining framework-agnostic `Request` and `Response` objects. In a real application, a specific web framework (like Flask or FastAPI) would use a `cross-web` adapter to convert its native request/response objects to `cross-web`'s types, allowing you to write your business logic using these unified types. This example is runnable and simulates the creation and processing of these objects.

from cross_web import Request, Response def my_framework_agnostic_handler(request: Request) -> Response: # This function represents a handler written using cross-web's abstractions name = request.query_params.get('name', 'World') body_content = f"Hello, {name}! This is a cross-web response." return Response( status_code=200, headers={'Content-Type': 'text/plain'}, body=body_content.encode('utf-8') ) # --- Example of how a web framework adapter might use it --- # In a real application, a framework-specific adapter would create # the Request object and handle the Response object. # Simulate an incoming request simulated_request = Request( method="GET", path="/greeting", headers={ "Host": "example.com", "User-Agent": "curl/7.81.0" }, query_params={ "name": "cross-web user" }, body=b'' ) # Call the framework-agnostic handler response_obj = my_framework_agnostic_handler(simulated_request) # Output the response details (what a framework adapter might send back) print(f"Status: {response_obj.status_code}") print(f"Headers: {response_obj.headers}") print(f"Body: {response_obj.body.decode('utf-8')}")
Debug
Known issues
breakingThe package name and import path changed from `lia-web` to `cross-web` in version 0.4.0. Code using `from lia_web import ...` will need to be updated.
fix
Update all import statements from `from lia_web import ...` to `from cross_web import ...`. While `lia-web` acts as a shim, direct imports are recommended for future compatibility.
affects: >=0.4.0
deprecatedThe `lia-web` package is now deprecated. It acts as a compatibility shim for `cross-web` but should not be used for new projects or ongoing development.
fix
Install and use `cross-web` directly. Update all imports from `lia_web` to `cross_web`.
affects: >=0.4.0
gotchaPydantic was removed as a dependency in version 0.2.2. If your application implicitly relied on Pydantic being a dependency of `cross-web` (e.g., for schema validation outside of `cross-web`'s explicit use), it might break.
fix
Ensure Pydantic is explicitly listed in your project's dependencies if your code relies on its presence. `cross-web` itself no longer requires it.
affects: >=0.2.2
gotchaA fix for handling multipart form data in the AioHTTP integration was introduced in version 0.2.1. Older versions might have issues with file uploads or on-demand processing.
fix
Upgrade to `cross-web` version 0.2.1 or higher to ensure correct multipart form data processing, especially when using the AioHTTP adapter.
affects: <0.2.1
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cross_web'
The 'cross-web' library is not installed in the active Python environment or the environment where the script is being run.
fix
pip install cross-web
ImportError: cannot import name 'UnifiedApp' from 'cross_web'
The specified component 'UnifiedApp' is either misspelled, does not exist at the imported path within the 'cross-web' library, or its name has been changed in the current version (0.4.1).
fix
Consult the 'cross-web' official documentation for the correct class or function name and its import path. For example, if the main application class is simply 'App', the fix would be: `from cross_web import App`
AttributeError: 'CrossWebAdapter' object has no attribute 'run_flask_server'
The 'cross-web' library provides a unified interface, so direct framework-specific execution methods like 'run_flask_server' are typically not exposed on its core objects. Developers might attempt to use framework-specific methods directly on cross-web's abstracted objects.
fix
Refer to the 'cross-web' documentation on how to integrate and run the application with specific web frameworks (FastAPI, Flask, Django). It likely involves passing the `cross-web` application instance to the chosen framework's standard server command or utility, rather than calling a direct 'run' method on the `cross-web` object itself.
Upgrade
Version history
0.7.0latest on PyPI · released May 19, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
Amazon
1
Resources
cross-web — pip install cross-web · libregistry