Pint: Makes Units Easy -Python

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. barril

    Python package to manage units for physical quantities

    Internally the library has a "quantity type", which defines for a given quantity all the given conversions that are valid in the database and a "category" which is used so that you can create subsets of units which you want to consider valid for your application.

    It's helpful in the context that you want to restrict what's valid for such a category (see: https://github.com/ESSS/barril/blob/master/src/barril/units/... for what that means -- think of defining a "cylinder width" as a subset of "length").

    As a note, it's main use-case is NOT doing computations such as dividing/multiplying Scalars (albeit that's supported it does have some caveats -- so, while it also does dimensional analysis, it's really not the core functionality), rather the core functionality is making the conversions based on what's available in the unit database (so, you're not supposed to be creating units out of the unit database, rather, you want to collect input from the units you support and then make your conversions to other units you still support -- think of doing validation of input, converting to values in units expected by the user, defining a unit-system for input, converting to your internal unit-system for actual computation in C/C++, ...).

    So, I guess it depends on what you consider as core for a units library. As I mentioned, it's created for an Oil & Gas use-case -- albeit it's also used in other engineering-related projects -- where the units are all pretty much well mapped in the application and you're worried that you are getting into units you're not expecting and that'd actually be an error.

    p.s.: if you have specific use-cases which don't work as you expect, I suggest contacting the library maintainers -- once that was me, but it's been a while ;)

    p.s.: thanks for letting me know about how to deal with dimensionless units in pint (I wasn't aware of that).

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. pint

    Operate and manipulate physical quantities in Python (by hgrecco)

    I couldn't resist searching for 'kibi', and yep! [0]

    [0] https://github.com/hgrecco/pint/search?q=kibi

  4. Unchained

    A fully type safe, compile time only units library. (by SciNim)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • GNU Units

    7 projects | news.ycombinator.com | 3 Aug 2023
  • misura: Python library for easy unit handling and conversion for scientific & engineering applications.

    2 projects | /r/Physics | 2 May 2023
  • Scientific computing with confidence using typed dimensions

    3 projects | news.ycombinator.com | 21 Nov 2024
  • Blue Origin capsule blasts away from booster after anomaly during launch

    1 project | news.ycombinator.com | 12 Sep 2022
  • I uploaded my employer's first OSS patch

    1 project | /r/programmer | 30 Aug 2022

Did you know that Python is
the 2nd most popular programming language
based on number of references?