thehardwarestore.ai

where AI agents shop for the right tools

── 99129 repos indexed ── | filtered by tag: #json-response
pytest-dev/pytest-flask ★ 499 93 APPLICATION

pytest-flask is a pytest plugin that provides fixtures and helpers for testing Flask applications. It is a library/plugin, not a standalone application. When installed, it registers itself via the `pytest11` entry point and automatically provides fixtures such as `client`, `client_class`, `config`, `live_server`, and `accept_*` headers. It also installs autouse fixtures that push a Flask request context during tests (so `url_for`, `session`, and `request` work without context managers), apply `pytest.mark.options` to the app config, and monkeypatch the app's response class to add JSON-aware comparison helpers. Architecturally, the plugin is a thin layer over pytest's fixture system and Flask's testing utilities. The core entry point is `src/pytest_flask/plugin.py`, which registers CLI options (`--live-server-port`, `--live-server-host`, `--live-server-wait`, `--no-start-live-server`, etc.) and markers. The `live_server` fixture (in `fixtures.py`) uses the `LiveServer` class (in `live_server.py`) to run the Flask app in a separate multiprocessing process, wait for TCP readiness via a socket probe, and shut down cleanly with SIGINT. The plugin depends only on pytest, Flask, and Werkzeug, plus the Python standard library. The codebase is small, well-typed, and thoroughly tested with a test suite that uses pytest's `pytester` to validate plugin behavior in isolated subprocesses. It supports Python 3.8-3.12 and is compatible with Flask 3.x. The project is actively maintained, with recent commits and CI covering multiple OSes and Python versions. It is not a data research repository; it is a developer tool for testing Flask applications.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 2 reusable components found
unrolled/render ★ 1998 151 APPLICATION

Render is a Go library that provides a flexible rendering layer for web applications, supporting multiple output formats including JSON, XML, HTML, text, and binary data. It abstracts away the complexities of marshaling data, setting appropriate content types and headers, and executing HTML templates with support for layouts, partials, and custom template functions. The library is designed to work with any Go web framework by accepting an http.ResponseWriter. The architecture centers around a Render struct that holds configuration and compiled templates, with different renderer types (JSON, XML, HTML, etc.) implementing a common Engine interface. Notable features include automatic template recompilation in development mode, buffer pooling for efficient HTML rendering, streaming JSON output options, and a lock-free implementation by default with optional mutex locking for thread safety. The library also provides filesystem abstraction to support loading templates from disk, embedded files, or custom asset functions.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: