Skip to main content

A Python package for displaying file size

Project description

Size Calculator

Size Calculator is a Python package that calculates the size of a file or folder and prints it in bytes, kilobytes, and megabytes.

Installation

You can install the package using pip:

pip install sizecalculator

Usage

Once installed, you can use the sizecalculator command from the command line:

sizecalculator /path/to/your/file_or_folder

Replace /path/to/your/file_or_folder with the actual path of the file or folder you want to analyze.

Using print_size in Your Python Script

You can also use the print_size function in your Python scripts or projects. Here's an example:

from sizecalculator import print_size

file_or_folder_path = "/path/to/your/file_or_folder"
print_size(file_or_folder_path)

Replace /path/to/your/file_or_folder with the actual path of the file or folder you want to analyze.

Example

sizecalculator /path/to/your/file_or_folder

This will print the size of the specified file or folder in bytes, kilobytes, and megabytes.

The size information will be displayed in human-readable format, including bytes, kilobytes, and megabytes.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

sizecalculator-0.1.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file sizecalculator-0.1.tar.gz.

File metadata

  • Download URL: sizecalculator-0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for sizecalculator-0.1.tar.gz
Algorithm Hash digest
SHA256 174eb6cac0fffb76127adc84996fe908c72a71968eb77c9b25e2be16cbfd7eed
MD5 2b69f3b926b6a0d6098a62e2fea2782d
BLAKE2b-256 86e25d3c5c43dbb31b587108c6a9953fdbf398934b7167c828b7045511e18dd4

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