Skip to main content

Area Unit Conversion GitHub license

Python module to convert unit of area from one system of units to another.

Introduction

This package was created for real estate business purposes. The availables units of length are the most commonly used in industry.

Availables units:

Abbrev Unit "EN" Unit "ES" value
km² Square Kilometers Kilómetros cuadrados km2
m² Square Meters Metros cuadrados m2
mi² Square Miles Millas cuadradas mi2
yd² Square Yard Yardas cuadradas yd2
ft² Square Feet Pies cuadrados ft2
in² Square Inches Pulgadas cuadradas in2
ha Hectares Hectáreas ha
ac Acres Acres ac

Installation

$ pip install area_unit_conversion

Usage

convert

Converts unit of area from one system of units to another

Argument Type Default Description
from_unit_type str None Original system of unit area
to_unit_type str None Desired system of unit area
value float 0 Area value to convert
import area_unit_conversion

area_unit_conversion.convert('m2','ha',10000) 

# Return 1

get_units_of_length

Lists available units of length

Argument Type Default Description
lang str "en" iso code of language

Options: "es" | "en"

import area_unit_conversion

area_unit_conversion.get_units_of_length() 

# Return
[
    {
        'abbreviation': 'km²', 
        'value': 'km2', 
        'name': 'Square Kilometers'
    },{   
        'abbreviation': 'm²', 
        'value': 'm2', 
        'name': 'Square Meters'
    },{
        'abbreviation': 'mi²',
        'value': 'mi2',
        'name': 'Square Miles'
    }, 
    
    etc. , etc.
    }
]

Test

Running tests:

$ pytest

Checking the package installs correctly with different Python versions and interpreters.

Tested with python3.6, python3.7, python3.8, python3.9 and python3.10 versions:

$ tox

Contributing

Contributions are welcome - submit an issue/pull request.

Metadata

Release files for area-unit-conversion 1.0

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

Source distribution (sdist)

Source distribution for area-unit-conversion 1.0
File Size Uploaded
area_unit_conversion-1.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for area-unit-conversion 1.0
File Interpreter ABI Platform
area_unit_conversion-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / area_unit_conversion-1.0.tar.gz

Download URL area_unit_conversion-1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
86c8d413e3bcf12949fcd874aea3b2cc1556bd3fcd86c9ec02d20b8acadc0989
BLAKE2b-256 checksum
How to use checksums
421c3b124351b0d0957ddb9ec9574b2430f0e21cc9815daffcf538f3600e744b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Darwin/21.2.0

Release files / area_unit_conversion-1.0-py3-none-any.whl

Download URL area_unit_conversion-1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cb0023aa4ea4f7ed01db88d74ff387b5e6042c1cc058528ad45923d440e669d
BLAKE2b-256 checksum
How to use checksums
288d80275232ce19e11689412bfacff1b60d1e31aaeea58478378491b7174f4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Darwin/21.2.0

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

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