semvec/pypi-packages huggingface dataset:
pkg-about 2.2.0
Unified access to Python package metadata at runtime.
Requires Python: <4.0.0,>=3.10.0
Keywords: pkg_about, __about__, packaging

pkg_about
=========

Unified access to Python package metadata at runtime.

Overview
========

Provides a unified way to retrieve Python package metadata at runtime,
regardless of the build backend or project structure.

| **about(package: str)** - retrieves metadata for the given package
| **about()** - retrieves metadata for the current package
| **about_from_setup()** - retrieves metadata from pyproject.toml
                           and/or setup.cfg

`PyPI record`_.

`Documentation`_.

Usage
-----

.. code:: python

  >>> import pkg_about
  >>> pkg_about.about("pip")
  >>> __uri__ == "https://pip.pypa.io/"
  True

Installation
============

Prerequisites:

+ Python 3.10 or higher

  * https://www.python.org/

+ pip

  * https://pypi.org/project/pip/

To install run:

  .. parsed-literal::

    python -m pip install --upgrade |package|

Development
===========

Prerequisites:

+ Development is strictly based on *nox*. To install it run::

    python -m pip install --upgrade nox

Visit `Development page`_.

Installation from sources:

clone the sources:

  .. parsed-literal::

    git clone |respository| |package|

and run:

  .. parsed-literal::

    python -m pip install ./|package|

or on development mode:

  .. parsed-literal::

    python -m pip install --editable ./|package|

License
=======

  | |copyright|
  | Licensed under the zlib/libpng License
  | https://opensource.org/license/zlib
  | Please refer to the accompanying LICENSE file.

Authors
=======

* Adam Karpierz <adam@karpierz.net>

Sponsoring
==========

| If you would like to sponsor the development of this project, your contribution
  is greatly appreciated.
| As I am now retired, any support helps me dedicate more time to maintaining and
  improving this work.

`Donate`_

.. |package| replace:: pkg_about
.. |package_bold| replace:: **pkg_about**
.. |copyright| replace:: Copyright (c) 2020-2026 Adam Karpierz
.. |respository| replace:: https://github.com/karpierz/pkg_about
.. _Development page: https://github.com/karpierz/pkg_about
.. _PyPI record: https://pypi.org/project/pkg-about/
.. _Documentation: https://karpierz.github.io/pkg_about/
.. _Donate: https://www.paypal.com/donate/?hosted_button_id=FX8L7CJUGLW7S
interposition-http-adapter 0.2.0
HTTP adapter for Interposition.
Requires Python: >=3.10

# interposition-http-adapter

HTTP adapter for [Interposition](https://github.com/osoekawaitlab/interposition).
Serves recorded HTTP interactions from an Interposition `Cassette` as a real HTTP server, allowing you to replay captured API responses for testing and development.

## Installation

```bash
pip install interposition-http-adapter
```

## Usage

`InterpositionHttpAdapter` is an ASGI application (based on Starlette) that replays HTTP interactions through an Interposition `Broker`.

```python
from interposition import (
    Broker,
    Cassette,
    Interaction,
    InteractionRequest,
    ResponseChunk,
)
import uvicorn

from interposition_http_adapter import InterpositionHttpAdapter

# 1. Build an InteractionRequest describing the HTTP request to match
request = InteractionRequest(
    protocol="http",
    action="GET",
    target="/api/data",
    headers=(),
    body=b"",
)

# 2. Build ResponseChunks with status_code in the first chunk's metadata
response_chunks = (
    ResponseChunk(
        data=b'{"message": "hello"}',
        sequence=0,
        metadata=(("status_code", "200"),),
    ),
)

# 3. Create a Cassette containing the interaction
interaction = Interaction(
    request=request,
    fingerprint=request.fingerprint(),
    response_chunks=response_chunks,
)
cassette = Cassette(interactions=(interaction,))

# 4. Create a Broker in replay mode
broker = Broker(cassette=cassette, mode="replay")

# 5. Create the adapter and serve it
app = InterpositionHttpAdapter(broker=broker)
uvicorn.run(app, host="127.0.0.1", port=8000)
```

Once the server is running, a `GET` request to `http://127.0.0.1:8000/api/data` returns the recorded response with status code 200 and body `{"message": "hello"}`.
The adapter supports all standard HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS). Requests that do not match any recorded interaction return a `500 Internal Server Error` response.

## API Reference

Detailed documentation is available in MkDocs: <https://osoekawaitlab.github.io/interposition-http-adapter/>.

## CLI

The package provides a command-line interface:

```bash
interposition_http_adapter --version
```

## License

MIT