get-rectangle-infos


Nameget-rectangle-infos JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/get_rectangle_infos
SummaryThere are 3 common rectangle formats, and converting them all the time really is a pain in the a**
upload_time2023-01-04 01:03:18
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords rectangle convert coordinates
VCS
bugtrack_url
requirements flatten_everything more_itertools
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# There are 3 common rectangle formats, and converting them all the time really is a pain in the a**
### Using this function, you get all 3 formats, center coordinates, height, width and the area


```python
# Tested with:
# Python 3.9.13
# Windows 10

pip install get-rectangle-infos

from get_rectangle_infos import get_rectangle_information

format_1x4 = (0, 0, 100, 200)
format_4x2 = [(0, 0), (100, 0), (100, 200), (0, 200)]
format_2x2 = [(0, 0), (100, 200)]

print(get_rectangle_information(rect=(0, 0, 100, 200)))
# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))

print(get_rectangle_information(rect=[(0, 0), (100, 0), (100, 200), (0, 200)]))
# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))

print(get_rectangle_information(rect=[(0, 0), (100, 200)]))
# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))



	
```





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/get_rectangle_infos",
    "name": "get-rectangle-infos",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "rectangle,convert,coordinates",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/25/ca/721001fb78a1af21e69adf68f55369aa02c97369da49335ecb0b665f2464/get_rectangle_infos-0.10.tar.gz",
    "platform": null,
    "description": "\n# There are 3 common rectangle formats, and converting them all the time really is a pain in the a**\n### Using this function, you get all 3 formats, center coordinates, height, width and the area\n\n\n```python\n# Tested with:\n# Python 3.9.13\n# Windows 10\n\npip install get-rectangle-infos\n\nfrom get_rectangle_infos import get_rectangle_information\n\nformat_1x4 = (0, 0, 100, 200)\nformat_4x2 = [(0, 0), (100, 0), (100, 200), (0, 200)]\nformat_2x2 = [(0, 0), (100, 200)]\n\nprint(get_rectangle_information(rect=(0, 0, 100, 200)))\n# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))\n\nprint(get_rectangle_information(rect=[(0, 0), (100, 0), (100, 200), (0, 200)]))\n# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))\n\nprint(get_rectangle_information(rect=[(0, 0), (100, 200)]))\n# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))\n\n\n\n\t\n```\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "There are 3 common rectangle formats, and converting them all the time really is a pain in the a**",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/get_rectangle_infos"
    },
    "split_keywords": [
        "rectangle",
        "convert",
        "coordinates"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a87e57b9bfe69899cf3bec56a11eeb226a79d26ee2e4e559af904d0ca6d85e9",
                "md5": "d8925ed2085dab6e5f28aac22390dd6f",
                "sha256": "e38596c1f55fcbd567bb7306a7d5218f5d3e74cb17db2807936b66da78e97031"
            },
            "downloads": -1,
            "filename": "get_rectangle_infos-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d8925ed2085dab6e5f28aac22390dd6f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5105,
            "upload_time": "2023-01-04T01:03:16",
            "upload_time_iso_8601": "2023-01-04T01:03:16.905596Z",
            "url": "https://files.pythonhosted.org/packages/8a/87/e57b9bfe69899cf3bec56a11eeb226a79d26ee2e4e559af904d0ca6d85e9/get_rectangle_infos-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25ca721001fb78a1af21e69adf68f55369aa02c97369da49335ecb0b665f2464",
                "md5": "f72faa39d8052810f6338586aaa65624",
                "sha256": "155b53a236cba7d1ae86e4a654aba3d16439badb1d9d20b28ab6430363b2c7ac"
            },
            "downloads": -1,
            "filename": "get_rectangle_infos-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "f72faa39d8052810f6338586aaa65624",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3636,
            "upload_time": "2023-01-04T01:03:18",
            "upload_time_iso_8601": "2023-01-04T01:03:18.174038Z",
            "url": "https://files.pythonhosted.org/packages/25/ca/721001fb78a1af21e69adf68f55369aa02c97369da49335ecb0b665f2464/get_rectangle_infos-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-04 01:03:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "get_rectangle_infos",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "flatten_everything",
            "specs": []
        },
        {
            "name": "more_itertools",
            "specs": []
        }
    ],
    "lcname": "get-rectangle-infos"
}
        
Elapsed time: 0.48803s