Skip to main content

WTSize let's you check the size of a remote file without downloading it.

Project description


On the road with a limited data plan or bad network and want to know if it's safe to download a particular remote file? WTSize (what the size) is a small Python 3 CLI app which checks the size of remote files without downloading them (by looking at the Content-Length header).

>>> wtsize https://site.tld/
822.24 MiB


wtsize URL
wtsize URL [--unit=MiB]
wtsize -h | --help
wtsize --version


pip install wtsize


  • Not all servers return a Content-Length header so you might be unable to get the actual file size without, well, downloading the file. wtsize will tell you if that's the case.
  • In some cases the Content-Length cannot be known before accessing the body (dynamic content)
  • Headers can easily be spoofed. Generally, though, there's a good chance that the Content-Length header in the server response is accurate.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wtsize, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size wtsize-0.1.0-py3-none-any.whl (3.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size wtsize-0.1.0.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page