Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pypuq

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pypuq

Physical Units and Quantities for Python

  • 1.3.9
  • PyPI
  • Socket score

Maintainers
1

SciNumTools v3
Physical units and quantities for Python (pypuq)

This module is a Python binding of the C++ library scnt-puq. You can read more about this module and its functionality in the SciNumTool documentation.

Installation

To start, one has to install the scnt-puq library. On macOS this can be easily done using homebrew formula:

brew tap vrtulka23/scinumtools
brew install vrtulka23/scinumtools/scnt-puq

After that, one can proceed with the usual PyPi installation:

pip3 install pypuq

Examples of use

As already mentioned, pypuq is a binding to the standalone C++ library scnt-puq. Therefore, pypuq inherits all its usual functionality. However, the Python interface of exposed classes (Quantity, UnitSystem) is slightly adapted.

>>> from pypuq import Quantity
>>> 
>>> q = Quantity(16, 'm')
>>> r = Quantity(223, 's')
>>> speed = (q/r).convert('mph')
0.0717489*m*s-1

More examples and explanation are available in the SciNumTools documentation. You can also look at the test problems in the pytest directory.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc