Skip to content

Commit

Permalink
set default values
Browse files Browse the repository at this point in the history
  • Loading branch information
rishiraj authored Sep 22, 2024
1 parent 88eab2b commit e574d1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![PyPI version](https://img.shields.io/pypi/v/firerequests.svg)](https://pypi.org/project/firerequests/) [![License](https://img.shields.io/pypi/l/firerequests.svg)](https://github.com/rishiraj/firerequests/blob/main/LICENSE) [![Python version](https://img.shields.io/pypi/pyversions/firerequests.svg)](https://pypi.org/project/firerequests/)

**FireRequests** is a high-performance, asynchronous HTTP client library for Python, engineered to accelerate your file transfers. By harnessing advanced concepts like semaphores, exponential backoff with jitter, concurrency, and fault tolerance, FireRequests can achieve up to a **5x real-world speedup** in file downloads and uploads compared to traditional synchronous methods.
**FireRequests** is a high-performance, asynchronous HTTP client library for Python, engineered to accelerate your file transfers. By harnessing advanced concepts like semaphores, exponential backoff with jitter, concurrency, and fault tolerance, FireRequests can achieve up to a **6x real-world speedup** in file downloads and uploads compared to traditional synchronous methods.

## Features 🚀

Expand Down Expand Up @@ -39,11 +39,11 @@ fr.download(url, filename)
FireRequests delivers significant performance improvements over traditional download methods. Below is the result of a real-world speed test:

```plaintext
Normal Download 🐌: 100%|██████████| 3.42G/3.42G [06:16<00:00, 9.08MB/s]
Downloading on 🔥: 100%|██████████| 3.42G/3.42G [01:15<00:00, 45.2MB/s]
Normal Download 🐌: 100%|██████████| 3.42G/3.42G [18:26<00:00, 3.09MB/s]
Downloading on 🔥: 100%|██████████| 3.42G/3.42G [03:29<00:00, 16.4MB/s]
🐌 Download Time: 376.77 seconds
🔥 Download Time: 75.75 seconds
🐌 Download Time: 1107.32 seconds
🔥 Download Time: 209.41 seconds
```

## Advanced Usage ⚙️
Expand Down
4 changes: 2 additions & 2 deletions firerequests/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def download_chunk(

async def download_file(
self, url: str, filename: str, max_files: int, chunk_size: int, headers: Optional[Dict[str, str]] = None,
parallel_failures: int = 0, max_retries: int = 0, callback: Optional[Any] = None
parallel_failures: int = 3, max_retries: int = 5, callback: Optional[Any] = None
):
headers = headers or {}
try:
Expand Down Expand Up @@ -96,7 +96,7 @@ async def download_chunk_with_retries(

async def upload_file(
self, file_path: str, parts_urls: List[str], chunk_size: int, max_files: int,
parallel_failures: int = 0, max_retries: int = 0, callback: Optional[Any] = None
parallel_failures: int = 3, max_retries: int = 5, callback: Optional[Any] = None
):
file_size = os.path.getsize(file_path)
tasks = []
Expand Down

0 comments on commit e574d1a

Please sign in to comment.