Metadata-Version: 2.4
Name: api-forwarder
Version: 2.0.1
Summary: API-Forwarder: Simplify API calls by sharing a base URL.
Project-URL: Homepage, https://github.com/CrossDarkrix/API-Forwarder
Author: CrossDarkRix
License: MIT License
        
        Copyright (c) 2026 CrossDarkrix
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: api,api-forwarder,forwarder
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet
Requires-Python: >=3.8
Requires-Dist: cloudscraper
Requires-Dist: httpx
Description-Content-Type: text/markdown

API-Forwarder

API Forwarder
  
Simplify API calls by sharing a base URL

Features

- No need to repeat the same base API URL for every request.
  
- Specify a base URL once, then call API endpoints using relative paths.
  
- Pluggable HTTP backends (httpx or CloudScraper).

This library is designed to be imported and reused across projects,
providing a consistent and clean way to interact with HTTP-based APIs.

## Usage

```python
from api_forwarder import Forwarder

async def get_api():
    async with Forwarder("https://api.example.com") as fw:
        response = await fw.get("/v1/status")
        response.raise_for_status()
        print(response.json())
```

## Use Other Options

```python
from api_forwarder import Forwarder
async def get_api():
    async with Forwarder(
        "https://api.example.com",
        backend="cloudscraper",
        timeout=5.0,
        retries=3,
        retry_delay=1.0,
    ) as fw:
        response = await fw.get("/v1/status")
        response.raise_for_status()
        print(response.json())
```
