Skip to main content

Convert all of your bytes

Project description

DataConverter

I needed a tool that would convert data sizes. It was a good candidate to put up.

Details

Give this tool a string with space separated values and it will return the byte size conversions from bytes to petabytes.

Usage

First arguement will always be what the current data size level is in: pages = p kb = k mb = m gb = g tb = t pb = pb

any number values after that will be summed, then output to 4 conversions + the current data size level.

You can also mix and repeat arguments!

p num num k num num pb 1 p num num num k num ...

This makes the tool more versitile than originally implemented.

Example

p 100 200 300 k 400 250 512 pb 1 g 400 25 p 50000

will yield:

Bytes : 1126356662822912.0

Pages : 137494709817.25

Kilobytes : 1099957678538.0

Megabytes : 1074177420.4472656

Gigabytes : 1049001.3871555328

Terabytes : 1024.415417144075

Petabytes : 1.0004056808047608

todo

Ducktype for:

string - space separated string - comma separated dictionary tuple list

The return type of this tool is always a dict so you can pick which or all byte value types. this allows the appliation to choose what values to collect and use.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

bytesized-0.1.1-py2.py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 2 Python 3

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