Download web pages and files from the internet using CLI or as a Python module.
Project description
net-dl
Download web pages and files from the internet. Can be used as a standalone CLI command, or as a python module.
Installation
End Users (with pipx)
python3 -m pip install pipx
pipx install net-dl
Dev Users (with pip)
python3 -m pip install net-dl
External progress bar example
demo/tkapp.py:
from net_dl import Download
from queue import Queue
from threading import Thread
from tkinter import IntVar
from tkinter import StringVar
from tkinter import Tk
from tkinter import ttk
class Win(ttk.Frame):
def __init__(self, root):
super().__init__(root)
self.root = root
self.root.title("net-dl demo")
self.urlv = StringVar()
self.urlw = ttk.Entry(self, textvariable=self.urlv)
self.getw = ttk.Button(self, text="Get", command=self.get)
self.progq = Queue()
self.progv = IntVar()
self.proge = '<<UpdateProgress>>'
self.root.bind(self.proge, self.update_progress)
self.progw = ttk.Progressbar(
self,
mode='determinate',
variable=self.progv,
)
self.grid(column=0, row=0, sticky='nesw')
self.urlw.grid(column=0, row=0, columnspan=4, sticky='we')
self.getw.grid(column=4, row=0)
self.progw.grid(column=0, row=1, columnspan=5, sticky='we')
def get(self):
dl = Download(
self.urlv.get(),
progress_queue=self.progq,
callback=self.root.event_generate,
callback_args=[self.proge],
)
self.get_thread = Thread(target=dl.get, daemon=True)
self.get_thread.start()
def update_progress(self, evt):
self.progv.set(self.progq.get())
def run():
root = Tk()
Win(root)
root.mainloop()
Run code:
demo$ python -c 'import tkapp; tkapp.run()'
https://github.com/user-attachments/assets/a33d7752-3167-4224-a7ce-4fb56f69fe5d
Releasing on PyPI
- Create new tag in repo that matches package version; e.g. if version is "0.1.0", tag will be "v0.1.0".
- CI will auto build and upload package to TestPyPI and PyPI.
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 net_dl-0.2.3.tar.gz.
File metadata
- Download URL: net_dl-0.2.3.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b975abeb5596ade4b3f619b6e28c5746f88e9cabb3ad74301e14114af4db565f
|
|
| MD5 |
40e5caef85c1c3284f491ea8b15459f9
|
|
| BLAKE2b-256 |
e973ebbd9c9f660902da4e22a4e805c3a06d20b3e35ae2c00013f6e1b7c165f1
|
Provenance
The following attestation bundles were made for net_dl-0.2.3.tar.gz:
Publisher:
publish.yml on sil-car/net-dl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
net_dl-0.2.3.tar.gz -
Subject digest:
b975abeb5596ade4b3f619b6e28c5746f88e9cabb3ad74301e14114af4db565f - Sigstore transparency entry: 152569071
- Sigstore integration time:
-
Permalink:
sil-car/net-dl@3b924538d4cd4faf97a85f75b3b7a7dbc09fd0e2 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/sil-car
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3b924538d4cd4faf97a85f75b3b7a7dbc09fd0e2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file net_dl-0.2.3-py3-none-any.whl.
File metadata
- Download URL: net_dl-0.2.3-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8306d5e74f8f19578b63c3f20c796d7c38d5d4a4acc5ad1f19c89dff4bce0415
|
|
| MD5 |
92c2c6a1b1fc5090b26c41b9d00caad2
|
|
| BLAKE2b-256 |
7ff4d79061ec8b75c96174033874061e6159aa3bdb7bc2fe5076e71ec18cac15
|
Provenance
The following attestation bundles were made for net_dl-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on sil-car/net-dl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
net_dl-0.2.3-py3-none-any.whl -
Subject digest:
8306d5e74f8f19578b63c3f20c796d7c38d5d4a4acc5ad1f19c89dff4bce0415 - Sigstore transparency entry: 152569072
- Sigstore integration time:
-
Permalink:
sil-car/net-dl@3b924538d4cd4faf97a85f75b3b7a7dbc09fd0e2 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/sil-car
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3b924538d4cd4faf97a85f75b3b7a7dbc09fd0e2 -
Trigger Event:
push
-
Statement type: