Skip to content

Commit

Permalink
Improve file organization
Browse files Browse the repository at this point in the history
  • Loading branch information
mjishnu committed Jun 18, 2024
1 parent 060f573 commit f6ff383
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
5 changes: 4 additions & 1 deletion pypdl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
from .main import Pypdl, PypdlFactory
__version__ = "1.4.1"

from .pypdl_manager import Pypdl
from .pypdl_factory import PypdlFactory
18 changes: 0 additions & 18 deletions pypdl/main.py

This file was deleted.

10 changes: 8 additions & 2 deletions pypdl/factory.py → pypdl/pypdl_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
8 changes: 7 additions & 1 deletion pypdl/manager.py → pypdl/pypdl_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit f6ff383

Please sign in to comment.