Metadata-Version: 2.4
Name: atomhttp
Version: 1.0.1
Summary: Professional asynchronous HTTP client for Python — interceptors, progress tracking, FormData, Blob, concurrent requests, and full type hints
Author-email: Abolfazl Hosseini <tryuzr@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/inject3r/atomhttp
Project-URL: Repository, https://github.com/inject3r/atomhttp.git
Project-URL: Documentation, https://inject3r.github.io/atomhttp
Project-URL: Issues, https://github.com/inject3r/atomhttp/issues
Project-URL: Changelog, https://github.com/inject3r/atomhttp/releases
Keywords: http,client,async,await,aiohttp,rest,api,interceptor,progress,formdata
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Framework :: AsyncIO
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.8.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: isort>=5.10.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Provides-Extra: all
Requires-Dist: aiohttp>=3.8.0; extra == "all"
Requires-Dist: pytest>=7.0.0; extra == "all"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "all"
Requires-Dist: pytest-cov>=4.0.0; extra == "all"
Dynamic: license-file

<p align="center">
  <img src="https://inject3r.github.io/atomhttp/logo.jpg" alt="AtomHTTP Logo" width="350">
</p>

# AtomHTTP

A professional, feature-rich asynchronous HTTP client for Python — designed for developers who need reliability, flexibility, and performance.

**[Full Documentation](https://inject3r.github.io/atomhttp)** — Complete API reference, advanced guides, and examples

<br/>

## Features

- **Full HTTP Method Support**: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS with async/await syntax
- **Request & Response Interceptors**: Modify requests before sending and responses before returning
- **Upload & Download Progress Tracking**: Real-time callbacks for monitoring data transfer
- **FormData Support**: Multipart/form-data and URL-encoded form handling with file uploads
- **Multiple Response Types**: JSON (auto-parsed), text, blob, arraybuffer, and stream
- **Concurrent Request Helpers**: Execute multiple requests in parallel with `all()` and `spread()`
- **Base URL Configuration**: Set a base URL once and use relative paths
- **Automatic JSON Serialization**: No need to manually encode/decode JSON
- **Authentication**: Basic Auth and Bearer Token support
- **Comprehensive Error Handling**: Typed exceptions with standardized error codes
- **Timeout & Redirect Control**: Configurable timeouts and maximum redirect limits
- **Keep-Alive & Connection Pooling**: Reuse connections for better performance
- **Proxy Support**: Route requests through HTTP proxies
- **Unix Socket Path Support**: Connect via Unix domain sockets
- **Size Limits**: Configure maximum request body and response content lengths
- **Status Code Validation**: Custom validation functions for HTTP status codes
- **CSRF Protection**: Built-in support for XSRF token headers
- **Automatic Decompression**: Handles gzip and deflate compressed responses
- **Mock Adapter for Testing**: Simulate responses without network calls
- **Type Hints**: Full typing support for excellent IDE autocompletion

## Installation

```bash
pip install atomhttp
```

With development dependencies:

```bash
pip install atomhttp[dev]
```

## Quick Start

```python
import asyncio
from atomhttp import AtomHTTP

async def main():
    client = AtomHTTP({'baseURL': 'https://api.example.com'})
    response = await client.get('/users')
    print(response.status, response.data)
    await client.close()

asyncio.run(main())
```

## Documentation

For complete documentation, API reference, and advanced usage examples, visit:

**[https://inject3r.github.io/atomhttp](https://inject3r.github.io/atomhttp)**

The documentation includes:

- Detailed API reference for all classes and methods
- Advanced usage patterns and best practices
- Configuration options and their effects
- Error handling strategies
- Migration guides from other HTTP clients

## Requirements

- Python 3.8+
- aiohttp 3.8.0+

## Running Tests

```bash
# Run all tests with coverage
./scripts/tests.sh

# Clean test output files
./scripts/test_clean.sh
```

## License

This project is licensed under the MIT License.

## Author

**Abolfazl Hosseini**

- Email: tryuzr@gmail.com
- GitHub: [@inject3r](https://github.com/inject3r)

## Contributing

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

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## Acknowledgments

- [aiohttp](https://docs.aiohttp.org/) - Async HTTP client/server framework
- All contributors and users of this project
