{"id":13392640,"url":"https://github.com/hgrecco/pint","last_synced_at":"2026-10-19T07:21:35.616Z","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":"2026-10-13T21:13:47.000Z","size":5752,"stargazers_count":2814,"open_issues_count":212,"forks_count":557,"subscribers_count":41,"default_branch":"master","last_synced_at":"2026-10-17T04:52:46.507Z","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,"accessibility":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2012-07-13T16:27:11.000Z","updated_at":"2026-10-17T03:08:06.000Z","dependencies_parsed_at":"2026-10-16T23:14:17.339Z","dependency_job_id":null,"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":71,"template":false,"template_full_name":null,"purl":"pkg:github/hgrecco/pint","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","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hgrecco%2Fpint/sbom","scorecard":{"id":113967,"data":{"date":"2025-08-11","repo":{"name":"github.com/hgrecco/pint","commit":"88f2ff02921b6fae82185c966a865a6fa592ed12"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Code-Review","score":4,"reason":"Found 11/26 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"21 commit(s) and 19 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/bench.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bench.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/bench.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bench.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/bench.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/bench.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/bench.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:105: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:127: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:128: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/hgrecco/pint/docs.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/bench.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/bench.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:47","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:51","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:55","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:68","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:73","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:113","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned","Info:   0 out of   8 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-387 / GHSA-j8fq-86c5-5v2r","Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2021-140 / GHSA-9w8r-397f-prfh","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: PYSEC-2021-141 / GHSA-pq64-v7f5-gqh8","Warn: Project is vulnerable to: PYSEC-2019-156 / GHSA-xp76-357g-9wqq","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T21:49:16.635Z","repository_id":3931445,"created_at":"2025-08-15T21:49:16.636Z","updated_at":"2025-08-15T21:49:16.636Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344836268,"owners_count":38332509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-17T02:00:06.547Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-10-19T07:21:35.611Z","avatar_url":"https://github.com/hgrecco.png","language":"Python","funding_links":[],"categories":["Python","فیزیک","Projects","🔢 Engineering Calculations \u0026 Computation","Others"],"sub_categories":["کار با زمان و تقویم","Science","Concept / visual 3D tools"],"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.12+ with minimal dependencies.\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    Quantity(3.04, \"meter\")\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    Quantity([ 3.04  4.03], \"meter\")\n    \u003e\u003e\u003e np.sum(_)\n    Quantity(7.07, \"meter\")\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(`float`, `fractions.Fraction`, `decimal.Decimal`, `numpy.ndarray`, etc).\nNumPy_ is supported, but not required.\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**Minimal dependencies**: it depends only on Python, its standard library and a couple small packages that\nimplement essential features (e.g. parsing unit definition files and caching).\nIt only interacts with other external packages, like 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"}