No project description provided
Project description
Threaded File Loader
Multithreaded Python package for faster file loading in machine learning.
Installation
pip install ThreadedFileLoader
Usage:
Loading Image Files:
from ThreadedFileLoader.ThreadedFileLoader import *
instance = ThreadedImageLoader("path_to_/*.jpg")
instance.start_loading()
images = instance.loaded_objects
Loading Text Files:
from ThreadedFileLoader.ThreadedFileLoader import *
instance = ThreadedTextLoader("path_to_/*.txt")
instance.start_loading()
images = instance.loaded_objects
Loading Custom File Formats
Threaded FileLoader can load different file types.
This examples shows how the ThreadedTextLoader
class
overloads the ThreadedFileLoader
class to load text files.
from ThreadedFileLoader.ThreadedFileLoader import *
class ThreadedTextLoader(ThreadedFileLoader):
def object_loader(self, path):
with open(path) as afile:
data = afile.readlines()
return data
instance = ThreadedTextLoader("path_to_/*.txt")
instance.start_loading()
texts = instance.loaded_objects
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
Close
Hashes for ThreadedFileLoader-1.0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5838e98ca3ecc713d166b5dec1e1b29741bca9692721bb8e5262bf951774de9 |
|
MD5 | c43f5c9fa9abc9d5b26ca54aacb25ed2 |
|
BLAKE2b-256 | 1bc811a2b2a4a8a0d21ead15eded6ea6c9c484ac72ce5b4e1feef8305a3720c0 |
Close
Hashes for ThreadedFileLoader-1.0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab7b6af5b76b2e785de340922311a3f03725d2dd2b9d2d0afebd75d91799d26 |
|
MD5 | 0ee3af190523436c359e8572a7397fa2 |
|
BLAKE2b-256 | fbb6896cfe7afb290c420d872f68ab8b0f55119b6bf11bfacc09c4173c3b401d |