Skip to main content

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

Project description

WTSize

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/some_big_file.zip
822.24 MiB

Usage

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

Install

pip install wtsize

Limitations

  • 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.

Source Distribution

wtsize-0.1.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

wtsize-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file wtsize-0.1.0.tar.gz.

File metadata

  • Download URL: wtsize-0.1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wtsize-0.1.0.tar.gz
Algorithm Hash digest
SHA256 32060cfc50ddf4720bb391ccfda07a38544cd343a8ba2da705fa4a08a7d83eff
MD5 23d2c3b234c9f10cd09bb107a709156a
BLAKE2b-256 a1ca6bcf2b2c046aaed658193e2b9cd9de7f13fd73a7c6320c7ee28360244ba3

See more details on using hashes here.

File details

Details for the file wtsize-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wtsize-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe4350a4180743fb85622052ae5a3c563788846ef1dc3b6a0b68b5227ed3bfd9
MD5 53b930d05490f6d57ad88ba4aa6a6aae
BLAKE2b-256 0f56c74b51616538e1dfa0b771b15e3ddd56d394aaeab66fe638ba30bbf48e4c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page