Metadata-Version: 2.1
Name: siquant
Version: 4.0.0b13
Summary: Dimensional Analysis and Unit Tracking Library
Home-page: https://github.com/keystonetowersystems/siquant
Author: Greg Echelberger
Author-email: greg@keystonetowersystems.com
License: UNKNOWN
Project-URL: Documentation, https://siquant.readthedocs.io/
Project-URL: Bug Tracker, https://github.com/keystonetowersystems/siquant/issues
Project-URL: Source Code, https://github.com/keystonetowersystems/siquant
Keywords: SI,units,dimensional analysis,quantities
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Provides-Extra: dev
Requires-Dist: coverage ; extra == 'dev'
Requires-Dist: numpy ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: sphinx ; extra == 'dev'
Provides-Extra: docs
Requires-Dist: numpy ; extra == 'docs'
Requires-Dist: sphinx ; extra == 'docs'
Provides-Extra: tests
Requires-Dist: coverage ; extra == 'tests'
Requires-Dist: numpy ; extra == 'tests'
Requires-Dist: pytest ; extra == 'tests'

=================================
``siquant``: Dimensional Analysis
=================================
.. image:: https://readthedocs.org/projects/siquant/badge/?version=latest
   :target: https://siquant.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status

.. image:: https://badge.fury.io/py/siquant.svg
   :target: https://badge.fury.io/py/siquant
   :alt: PyPi Package

.. image:: https://travis-ci.com/keystonetowersystems/siquant.svg?branch=master
   :target: https://travis-ci.com/keystonetowersystems/siquant
   :alt: Build Status

.. image:: https://coveralls.io/repos/github/keystonetowersystems/siquant/badge.svg?branch=master
   :target: https://coveralls.io/github/keystonetowersystems/siquant?branch=master
   :alt: Code Coverage

``siquant`` is a simple pure python 3 library to make dimensional analysis painless.

It is a small, flexible codebase aimed at 2 specific related problems: implicit unit
tracking, and ensuring semantic correctness (fail fast) with minimal overhead.

---------------
Getting Started
---------------

0. Install ``siquant``

``pip3 install siquant==4.0.0b13``

1. Implicit Unit Tracking:

.. code-block:: pycon

    >>> from siquant import si
    >>> a = 10 * si.millimeters
    >>> b = 10 * si.kilometers
    >>> ab = a * b
    >>> ab.quantity
    100
    >>> str(ab.units)
    '1*m**2'
    >>> ab.get_as(si.millimeters ** 2)
    100000000.0

2. Dimensional Analysis:

.. code-block:: pycon

    >>> from siquant.dimensions import area_t
    >>> from siquant import imperial, si

    >>> def real_estate_price(area):
    ...     assert area.is_of(area_t) #  or raise if at application/lib dmz
    ...     monies_per_square_foot = 100 / imperial.feet ** 2
    ...     return area * monies_per_square_foot
    ...
    >>> house_price = real_estate_price(100 * si.meters ** 2)
    >>> house_price
    Quantity(10000, SIUnit(10.763910, (0, 0, 0, 0, 0, 0, 0)))
    >>> round(house_price.get_as(si.unity))
    107639

----------------
Online Resources
----------------

``siquant`` is released under the `MIT LICENSE <https://github.com/keystonetowersystems/siquant/blob/master/LICENSE>`_.

Releases are hosted in the `pypi package repository <https://pypi.org/project/siquant/>`_.

More detailed documentation and examples can be found on `readthedocs <https://siquant.readthedocs.io/en/latest>`_.




