diff --git a/pypdl/__init__.py b/pypdl/__init__.py index 087d97d..6ae884c 100644 --- a/pypdl/__init__.py +++ b/pypdl/__init__.py @@ -1 +1,4 @@ -from .main import Pypdl, PypdlFactory +__version__ = "1.4.1" + +from .pypdl_manager import Pypdl +from .pypdl_factory import PypdlFactory diff --git a/pypdl/main.py b/pypdl/main.py deleted file mode 100644 index 1746cb6..0000000 --- a/pypdl/main.py +++ /dev/null @@ -1,18 +0,0 @@ -from .factory import Factory -from .manager import DownloadManager - - -class Pypdl(DownloadManager): - """ - A multi-segment file downloader that supports progress tracking, retries, pause/resume functionality etc. - - This class also supports additional keyword arguments specified in the documentation. - """ - - -class PypdlFactory(Factory): - """ - A factory class for managing multiple instances of the Pypdl downloader. - - This class also supports additional keyword arguments specified in the documentation. - """ diff --git a/pypdl/factory.py b/pypdl/pypdl_factory.py similarity index 97% rename from pypdl/factory.py rename to pypdl/pypdl_factory.py index 8d39531..6ed5382 100644 --- a/pypdl/factory.py +++ b/pypdl/pypdl_factory.py @@ -4,7 +4,7 @@ from logging import Logger, getLogger from typing import Union -from .manager import DownloadManager as Pypdl +from .pypdl_manager import Pypdl from .utls import ( AutoShutdownFuture, ScreenCleaner, @@ -15,7 +15,13 @@ ) -class Factory: +class PypdlFactory: + """ + A factory class for managing multiple instances of the Pypdl downloader. + + This class also supports additional keyword arguments specified in the documentation. + """ + def __init__( self, instances: int = 2, diff --git a/pypdl/manager.py b/pypdl/pypdl_manager.py similarity index 98% rename from pypdl/manager.py rename to pypdl/pypdl_manager.py index 35f0488..07cddab 100644 --- a/pypdl/manager.py +++ b/pypdl/pypdl_manager.py @@ -24,7 +24,13 @@ ) -class DownloadManager: +class Pypdl: + """ + A multi-segment file downloader that supports progress tracking, retries, pause/resume functionality etc. + + This class also supports additional keyword arguments specified in the documentation. + """ + def __init__( self, allow_reuse: bool = False, diff --git a/setup.py b/setup.py index 6a0b750..b5a19dc 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,12 @@ from setuptools import setup, find_packages -VERSION = "1.4.1" -DESCRIPTION = "A concurrent python download manager" +DESCRIPTION = "A concurrent pure python download manager" with open("README.md", "r") as f: LONG_DESCRIPTION = f.read() +with open("pypdl/__init__.py", "r") as f: + VERSION = f.readline().split("=")[1].strip().strip("\"'") + setup( name="pypdl", version=VERSION,