A fast and asynchronous image loader
Project description
Fast Images Loader
Fast Images Loader is an asynchronous tool for downloading images from the internet and saving them to a specified folder. It uses the aiohttp library for asynchronous HTTP requests and tqdm for displaying download progress.
Installation
You can install the package using pip:
pip install fast_images_loader
Usage
Loading via import is supported:
from fast_images_loader import FastImagesLoader
photo_urls = [
"list of urls",
]
photo_dir = "test_dir"
photo_paths = [os.path.join(photo_dir, f"{idx}.jpeg") for idx in range(len(photo_urls))]
FastImagesLoader().load_photos_to_folder(photo_urls, photo_paths, photo_dir)
Fast Images Loader can be used as a command in the command line:
fast_images_loader [photo_urls] [data_folder]
photo_urls: List of photo URLs to download.data_folder: Folder where the downloaded photos will be saved.
Example
fast_images_loader https://example.com/photo1.jpg https://example.com/photo2.jpg ./downloads
This will download the photos from the specified URLs and save them in the ./downloads folder.
Dependencies
aiohttptqdmlogurunest_asyncio
Development
If you want to make changes to the project, clone the repository and install the dependencies:
git clone https://github.com/your-profile/fast_images_loader.git
cd fast_images_loader
pip install -r requirements.txt
Testing
Tests are located in the tests folder. Use pytest to run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fast_images_loader-0.1.2.tar.gz.
File metadata
- Download URL: fast_images_loader-0.1.2.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
252eb5d8fb4d36533b54ec39fbbdc024c23cadae086d35961146dfe2874719b6
|
|
| MD5 |
ae3bb66f4cf884783b5b93d5f8462a31
|
|
| BLAKE2b-256 |
2a9dab4fb719a9efc9fa3660b9bc12d578d7d1b96bcb5eafed903b60cd3b1b5f
|
File details
Details for the file fast_images_loader-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fast_images_loader-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a87c1793610cc8fcff0346d82e51a13fc644e22ba40a99249304c56018515e
|
|
| MD5 |
2b4c9ef1c1b93594b41906dd29c9ce90
|
|
| BLAKE2b-256 |
a9d2f2153e65ba88b3c8f50400a8ac19196c6076e6e8858a8390b1b7935a0c2f
|