{"id":13392640,"url":"https://github.com/hgrecco/pint","last_synced_at":"2025-05-14T21:00:26.589Z","repository":{"id":3931445,"uuid":"5021892","full_name":"hgrecco/pint","owner":"hgrecco","description":"Operate and manipulate physical quantities in Python","archived":false,"fork":false,"pushed_at":"2025-04-14T09:49:35.000Z","size":4876,"stargazers_count":2551,"open_issues_count":310,"forks_count":480,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-05-07T20:26:38.228Z","etag":null,"topics":["python","science","units"],"latest_commit_sha":null,"homepage":"http://pint.readthedocs.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hgrecco.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-07-13T16:27:11.000Z","updated_at":"2025-05-07T12:30:32.000Z","dependencies_parsed_at":"2024-05-12T13:45:10.589Z","dependency_job_id":"953e11ff-902f-4957-96c9-36e35ce41627","html_url":"https://github.com/hgrecco/pint","commit_stats":{"total_commits":2154,"total_committers":219,"mean_commits":9.835616438356164,"dds":0.6513463324048282,"last_synced_commit":"62046f0518befbf870836fe3620bf0398d75999d"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hgrecco%2Fpint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hgrecco%2Fpint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hgrecco%2Fpint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hgrecco%2Fpint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hgrecco","download_url":"https://codeload.github.com/hgrecco/pint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227603,"owners_count":22035667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","science","units"],"created_at":"2024-07-30T17:00:31.160Z","updated_at":"2025-05-14T21:00:26.547Z","avatar_url":"https://github.com/hgrecco.png","language":"Python","funding_links":[],"categories":["Python","فیزیک"],"sub_categories":["کار با زمان و تقویم"],"readme":".. image:: https://img.shields.io/pypi/v/pint.svg\n    :target: https://pypi.python.org/pypi/pint\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n    :target: https://github.com/astral-sh/ruff\n    :alt: Ruff\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/format.json\n    :target: https://github.com/astral-sh/ruff\n    :alt: Ruff-Format\n\n.. image:: https://readthedocs.org/projects/pint/badge/\n    :target: https://pint.readthedocs.org/\n    :alt: Documentation\n\n.. image:: https://img.shields.io/pypi/l/pint.svg\n    :target: https://pypi.python.org/pypi/pint\n    :alt: License\n\n.. image:: https://img.shields.io/pypi/pyversions/pint.svg\n    :target: https://pypi.python.org/pypi/pint\n    :alt: Python Versions\n\n.. image:: https://github.com/hgrecco/pint/workflows/CI/badge.svg\n    :target: https://github.com/hgrecco/pint/actions?query=workflow%3ACI\n    :alt: CI\n\n.. image:: https://github.com/hgrecco/pint/workflows/Lint/badge.svg\n    :target: https://github.com/hgrecco/pint/actions?query=workflow%3ALint\n    :alt: LINTER\n\n.. image:: https://coveralls.io/repos/github/hgrecco/pint/badge.svg?branch=master\n    :target: https://coveralls.io/github/hgrecco/pint?branch=master\n    :alt: Coverage\n\n\nPint: makes units easy\n======================\n\nPint is a Python package to define, operate and manipulate physical\nquantities: the product of a numerical value and a unit of measurement.\nIt allows arithmetic operations between them and conversions from and\nto different units.\n\nIt is distributed with a comprehensive list of physical units, prefixes\nand constants. Due to its modular design, you can extend (or even rewrite!)\nthe complete list without changing the source code. It supports a lot of\nnumpy mathematical operations **without monkey patching or wrapping numpy**.\n\nIt has a complete test coverage. It runs in Python 3.9+ with no other dependency.\nIt is licensed under BSD.\n\nIt is extremely easy and natural to use:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import pint\n    \u003e\u003e\u003e ureg = pint.UnitRegistry()\n    \u003e\u003e\u003e 3 * ureg.meter + 4 * ureg.cm\n    \u003cQuantity(3.04, 'meter')\u003e\n\nand you can make good use of numpy if you want:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import numpy as np\n    \u003e\u003e\u003e [3, 4] * ureg.meter + [4, 3] * ureg.cm\n    \u003cQuantity([ 3.04  4.03], 'meter')\u003e\n    \u003e\u003e\u003e np.sum(_)\n    \u003cQuantity(7.07, 'meter')\u003e\n\n\nQuick Installation\n------------------\n\nTo install Pint, simply:\n\n.. code-block:: bash\n\n    $ pip install pint\n\nor utilizing conda, with the conda-forge channel:\n\n.. code-block:: bash\n\n    $ conda install -c conda-forge pint\n\nand then simply enjoy it!\n\n\nDocumentation\n-------------\n\nFull documentation is available at http://pint.readthedocs.org/\n\n\nCommand-line converter\n----------------------\n\nA command-line script `pint-convert` provides a quick way to convert between\nunits or get conversion factors.\n\n\nDesign principles\n-----------------\n\nAlthough there are already a few very good Python packages to handle physical\nquantities, no one was really fitting my needs. Like most developers, I\nprogrammed Pint to scratch my own itches.\n\n**Unit parsing**: prefixed and pluralized forms of units are recognized without\nexplicitly defining them. In other words: as the prefix *kilo* and the unit\n*meter* are defined, Pint understands *kilometers*. This results in a much\nshorter and maintainable unit definition list as compared to other packages.\n\n**Standalone unit definitions**: units definitions are loaded from a text file\nwhich is simple and easy to edit. Adding and changing units and their\ndefinitions does not involve changing the code.\n\n**Advanced string formatting**: a quantity can be formatted into string using\n`PEP 3101`_ syntax. Extended conversion flags are given to provide symbolic,\nLaTeX and pretty formatting. Unit name translation is available if Babel_ is\ninstalled.\n\n**Free to choose the numerical type**: You can use any numerical type\n(`fraction`, `float`, `decimal`, `numpy.ndarray`, etc). NumPy_ is not required\nbut supported.\n\n**Awesome NumPy integration**: When you choose to use a NumPy_ ndarray, its methods and\nufuncs are supported including automatic conversion of units. For example\n`numpy.arccos(q)` will require a dimensionless `q` and the units of the output\nquantity will be radian.\n\n**Uncertainties integration**:  transparently handles calculations with\nquantities with uncertainties (like 3.14±0.01 meter) via the `uncertainties\npackage`_.\n\n**Handle temperature**: conversion between units with different reference\npoints, like positions on a map or absolute temperature scales.\n\n**Dependency free**: it depends only on Python and its standard library. It interacts with other packages\nlike numpy and uncertainties if they are installed\n\n**Pandas integration**: Thanks to `Pandas Extension Types`_ it is now possible to use Pint with Pandas. Operations on DataFrames and between columns are units aware, providing even more convenience for users of Pandas DataFrames. For full details, see the `pint-pandas Jupyter notebook`_.\n\n\nPint is maintained by a community of scientists, programmers and enthusiasts around the world.\nSee AUTHORS_ for a complete list.\n\nTo review an ordered list of notable changes for each version of a project,\nsee CHANGES_\n\n\n.. _Website: http://www.dimensionalanalysis.org/\n.. _`comprehensive list of physical units, prefixes and constants`: https://github.com/hgrecco/pint/blob/master/pint/default_en.txt\n.. _`uncertainties package`: https://pythonhosted.org/uncertainties/\n.. _`NumPy`: http://www.numpy.org/\n.. _`PEP 3101`: https://www.python.org/dev/peps/pep-3101/\n.. _`Babel`: http://babel.pocoo.org/\n.. _`Pandas Extension Types`: https://pandas.pydata.org/pandas-docs/stable/development/extending.html#extension-types\n.. _`pint-pandas Jupyter notebook`: https://github.com/hgrecco/pint-pandas/blob/master/notebooks/pint-pandas.ipynb\n.. _`AUTHORS`: https://github.com/hgrecco/pint/blob/master/AUTHORS\n.. _`CHANGES`: https://github.com/hgrecco/pint/blob/master/CHANGES\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhgrecco%2Fpint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhgrecco%2Fpint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhgrecco%2Fpint/lists"}