Skip to main content

whratio

PyPI downloads PyPI version PyPI pyversions

Calculate integer and decimal aspect ratio for dimensions.

CLI examples

    $ whratio 1024 768
    4 3 1.3333333333333333
    $ whratio -d -n 2 256 196
    1.31
    whratio -WH 2560 1080 | tr " " :
    64:27

Python package examples

    >>> import whratio

    >>> whratio.as_int(1920, 1080)
    (16, 9)

    >>> whratio.as_float(1920, 1080)
    1.7777777777777777

    >>> round(whratio.as_float(1920, 1080), 2)
    1.78

Installation

Using pip:

    # pip3 install whratio

Metadata

Release files for whratio 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whratio 3.1.1
File Size Uploaded Provenance Actions
whratio-3.1.1.tar.gz 3.0 kB Without provenance Details for whratio-3.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for whratio 3.1.1
File Interpreter ABI Platform Actions
whratio-3.1.1-py3-none-any.whl Python 3 none any Details for whratio-3.1.1-py3-none-any.whl

Total release size: 7.1 kB

Release files / whratio-3.1.1.tar.gz

Download URL whratio-3.1.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
08b4ea847069d1bd931aa07922b107340ef4de009e55af84b64631b3bbaa3dc6
BLAKE2b-256 checksum
How to use checksums
22fb78b3746f85c7308378ffc7a89c194e6087c24aa8a4f1cbb73778c04ef8ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6

Release files / whratio-3.1.1-py3-none-any.whl

Download URL whratio-3.1.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df9ebdbdae4c7c52d93705379793d703528e5b23a94d2c7ae40bbc3fae738baa
BLAKE2b-256 checksum
How to use checksums
528be480532f0cea055af7bb8debb4cdde6709667560f8ee2d253f7cd0423f83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6

Security for whratio 3.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page