Metadata-Version: 2.4
Name: axios-py
Version: 0.1.0
Summary: Python HTTP client inspired by Axios
Project-URL: Homepage, https://github.com/avijitsen/axios-py
Author-email: Avijit Sen <avijitsen@example.com>
License: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: urllib3>=2.0.0
Provides-Extra: dev
Requires-Dist: black>=22.0.0; extra == 'dev'
Requires-Dist: isort>=5.0.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.18.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.0.200; extra == 'dev'
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.68.0; extra == 'fastapi'
Requires-Dist: uvicorn>=0.15.0; extra == 'fastapi'
Description-Content-Type: text/markdown

# axios-py

A Python HTTP client inspired by Axios, featuring both synchronous and asynchronous support.

## Features

- Promise-like interface with async/await support
- Unified API for sync & async requests
- Request and response interceptors
- Global & per-request configuration
- Automatic JSON parsing
- Retry mechanism with exponential backoff
- Cancelable requests
- Timeout control
- File upload/download progress tracking
- FastAPI integration
- Rate limiting support

## Installation

```bash
pip install axios-py
```

For FastAPI support:
```bash
pip install axios-py[fastapi]
```

## Quick Start

### Basic Usage

```python
from axios import Axios

# Create an instance
axios = Axios()

# Make a GET request
response = axios.get("https://api.example.com/data")
print(response.data)

# Make a POST request
response = axios.post(
    "https://api.example.com/data",
    data={"key": "value"}
)
print(response.data)
```

### Async Usage

```python
import asyncio
from axios import Axios

async def main():
    async with Axios() as axios:
        # Make async requests
        response = await axios.aget("https://api.example.com/data")
        print(response.data)

asyncio.run(main())
```

### FastAPI Integration

```python
from fastapi import FastAPI, Depends
from axios import Axios, AxiosRequestConfig
from axios.fastapi import get_axios

app = FastAPI()

# Create an Axios dependency
axios_dependency = get_axios()

@app.get("/data")
async def get_data(axios: Axios = Depends(axios_dependency)):
    response = await axios.aget("https://api.example.com/data")
    return response.data
```

## Documentation

For detailed documentation, please visit [the documentation site](https://axios-py.readthedocs.io/).

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 