chainfix


Namechainfix JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryFixed-point data types for signal processing and blockchain applications
upload_time2025-07-27 22:29:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (which shall not include communications that are conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution"). "Derivative Works" shall mean any work, whether in Source or Object form, that is based upon (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this definition, an editorial revision, annotation, elaboration, or other modification shall not constitute a Derivative Work, if such work constitutes a separate and independent work of authorship in itself. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution". "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to use, reproduce, modify, distribute, and prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, trademark, patent, attribution and disclaimer notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright notice to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Support. You may choose to offer, and to charge a fee for, warranty, support, indemnity or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or support. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in comment at the beginning of each source file for clarity. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Copyright 2021 PyDefi Development Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords fixed-point binary fixed-point decimal fixed-point
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to Chainfix
![chainfix](https://github.com/pydefi/chainfix/raw/main/docs/logo/chainfix_logo.png)

[![CI](https://github.com/pydefi/chainfix/actions/workflows/tox.yml/badge.svg)](https://github.com/pydefi/chainfix/actions/workflows/tox.yml)
[![Coverage Status](https://img.shields.io/badge/coverage-93%25-brightgreen)](https://github.com/pydefi/chainfix)
[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)](https://github.com/pydefi/chainfix)
[![License](https://img.shields.io/github/license/pydefi/chainfix)](https://github.com/pydefi/chainfix/blob/main/LICENSE)

Chainfix provides a way to represent numbers and perform simple math operations using fixed-point data types.

Chainfix supports binary fixed-point (base-2), decimal fixed-point (base-10)
or even arbitrary (base-N) fixed-point types.

Fixed-point data types are used in a wide range of computing applications. 
Binary-fixed point types are commonly used in the design of specialized hardware, 
FPGAs, ASICS, and signal processing applications.  

Decimal-fixed point types are commonly found in financial applications, blockchain, 
decentralized finance, and smart contracts
(e.g. the [solidity programming language](https://docs.soliditylang.org/)).


# Decimal fixed-point representations

The real-world value π can be represented with limited precision using 
two bytes in **decimal** fixed point format

```python
>>> from chainfix import * 
>>> from math import pi
>>> pid = Fixd(pi, wordlength=16, precision=4)
Fixd(3.1416, 16, 4)
```

The `.int` property returns the stored integer value:   

```python
>>> pid.int
31416
```

The resolution of the decimal fixed-point data type is `10 ** -precision`, which 
is also the value of one least significant bit:

```python
>>> pid.lsb
0.0001
```

The range of numbers that can be represented with this precision using 16 bits is:

```python
>>> (pid.lower_bound, pid.upper_bound)
(-3.2768, 3.2767)
```

The real-world value can also be displayed as an exact ratio of integers

```python
>>> pid.as_integer_ratio()
(3927, 1250)
```

The `.hex` property returns the two's complement representation of the stored integer

```python
>>> pid.hex
'0x7ab8'
```

When `Fixd` stores a negative number, the MSB of the stored integer is always 1: 

```python
>>> Fixd(-pi, 16, 4).hex
'0x8548'
```




# Binary fixed-point representations

Likewise, π can also be represented with limited precision using 
two bytes in **binary** fixed point format

```python
>>> pib = Fixb(pi, 16, 12)
Fixb(3.1416015625, 16, 12)
```

The `.int` property returns the stored integer value:   

```python
>>> pib.int
12868
```

The resolution of the decimal fixed-point data type is `2 ** -precision`, which 
is also the value of one least significant bit:

```python
>>> pib.lsb
0.000244140625
```

The range of numbers that can be represented with this precision using 16 bits is:

```python
>>> (pib.lower_bound, pib.upper_bound)
(-8.0, 7.999755859375)
```

The `.hex` property returns the two's complement representation of the stored integer

```python
>>> pib.hex
'0x3244'
```

When `Fixb` is used to store a negative number, the MSB of the stored integer is always 1: 

```python
>>> Fixb(-pi, 16, 4).hex
'0xffce'
```

# Contexts

Chainfix provides a fixed-point `context` to control the default behavior for new fixed-point objects.

The current context can be retrieved using

```python
>>> ctx = get_decimal_context()
>>> ctx.wordlength
256
>>> ctx.precision
18
```

for `Fixd` and `Ufixd` values or

```python
>>> ctx = get_binary_context()
>>> ctx.wordlength
32
>>> ctx.precision
16
```

for `Fixb` and `Ufixb` values.

The context can be modified to change the behavior of newly constructed values:

```python
>>> get_decimal_context().wordlength = 20
>>> get_decimal_context().precision = 5
>>> Fixd(pi)
Fixd(3.14159, 20, 5)
```

When passed through the constructor, the values for `wordlength` and `precision` always take precedence over the
context.

```python
>>> Fixd(pi, precision=10)
Fixd(3.1415926536, 256, 10)
```

Note that resulting data type has insufficinet range to represent the value pi.

# Future Work

* Support math operations for fixed-point types using the applicable context

# Contributing

## Package Installation
```bash
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate

# Install in development mode
pip install -e .

# Install with testing dependencies
pip install -e .[dev]  # if dev dependencies are defined
```

## Testing
```bash
# Run all tests
pytest

# Run tests with tox (multiple Python versions)
tox
```







            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "chainfix",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "fixed-point, binary fixed-point, decimal fixed-point",
    "author": null,
    "author_email": "PyDefi Development Team <MikesRND@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/6a/26/f28a97d002534d36e71b891ffb459e362215f9487ebac5a36fcdf9a3d00e/chainfix-0.1.2.tar.gz",
    "platform": null,
    "description": "# Welcome to Chainfix\n![chainfix](https://github.com/pydefi/chainfix/raw/main/docs/logo/chainfix_logo.png)\n\n[![CI](https://github.com/pydefi/chainfix/actions/workflows/tox.yml/badge.svg)](https://github.com/pydefi/chainfix/actions/workflows/tox.yml)\n[![Coverage Status](https://img.shields.io/badge/coverage-93%25-brightgreen)](https://github.com/pydefi/chainfix)\n[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)](https://github.com/pydefi/chainfix)\n[![License](https://img.shields.io/github/license/pydefi/chainfix)](https://github.com/pydefi/chainfix/blob/main/LICENSE)\n\nChainfix provides a way to represent numbers and perform simple math operations using fixed-point data types.\n\nChainfix supports binary fixed-point (base-2), decimal fixed-point (base-10)\nor even arbitrary (base-N) fixed-point types.\n\nFixed-point data types are used in a wide range of computing applications. \nBinary-fixed point types are commonly used in the design of specialized hardware, \nFPGAs, ASICS, and signal processing applications.  \n\nDecimal-fixed point types are commonly found in financial applications, blockchain, \ndecentralized finance, and smart contracts\n(e.g. the [solidity programming language](https://docs.soliditylang.org/)).\n\n\n# Decimal fixed-point representations\n\nThe real-world value &pi; can be represented with limited precision using \ntwo bytes in **decimal** fixed point format\n\n```python\n>>> from chainfix import * \n>>> from math import pi\n>>> pid = Fixd(pi, wordlength=16, precision=4)\nFixd(3.1416, 16, 4)\n```\n\nThe `.int` property returns the stored integer value:   \n\n```python\n>>> pid.int\n31416\n```\n\nThe resolution of the decimal fixed-point data type is `10 ** -precision`, which \nis also the value of one least significant bit:\n\n```python\n>>> pid.lsb\n0.0001\n```\n\nThe range of numbers that can be represented with this precision using 16 bits is:\n\n```python\n>>> (pid.lower_bound, pid.upper_bound)\n(-3.2768, 3.2767)\n```\n\nThe real-world value can also be displayed as an exact ratio of integers\n\n```python\n>>> pid.as_integer_ratio()\n(3927, 1250)\n```\n\nThe `.hex` property returns the two's complement representation of the stored integer\n\n```python\n>>> pid.hex\n'0x7ab8'\n```\n\nWhen `Fixd` stores a negative number, the MSB of the stored integer is always 1: \n\n```python\n>>> Fixd(-pi, 16, 4).hex\n'0x8548'\n```\n\n\n\n\n# Binary fixed-point representations\n\nLikewise, &pi; can also be represented with limited precision using \ntwo bytes in **binary** fixed point format\n\n```python\n>>> pib = Fixb(pi, 16, 12)\nFixb(3.1416015625, 16, 12)\n```\n\nThe `.int` property returns the stored integer value:   \n\n```python\n>>> pib.int\n12868\n```\n\nThe resolution of the decimal fixed-point data type is `2 ** -precision`, which \nis also the value of one least significant bit:\n\n```python\n>>> pib.lsb\n0.000244140625\n```\n\nThe range of numbers that can be represented with this precision using 16 bits is:\n\n```python\n>>> (pib.lower_bound, pib.upper_bound)\n(-8.0, 7.999755859375)\n```\n\nThe `.hex` property returns the two's complement representation of the stored integer\n\n```python\n>>> pib.hex\n'0x3244'\n```\n\nWhen `Fixb` is used to store a negative number, the MSB of the stored integer is always 1: \n\n```python\n>>> Fixb(-pi, 16, 4).hex\n'0xffce'\n```\n\n# Contexts\n\nChainfix provides a fixed-point `context` to control the default behavior for new fixed-point objects.\n\nThe current context can be retrieved using\n\n```python\n>>> ctx = get_decimal_context()\n>>> ctx.wordlength\n256\n>>> ctx.precision\n18\n```\n\nfor `Fixd` and `Ufixd` values or\n\n```python\n>>> ctx = get_binary_context()\n>>> ctx.wordlength\n32\n>>> ctx.precision\n16\n```\n\nfor `Fixb` and `Ufixb` values.\n\nThe context can be modified to change the behavior of newly constructed values:\n\n```python\n>>> get_decimal_context().wordlength = 20\n>>> get_decimal_context().precision = 5\n>>> Fixd(pi)\nFixd(3.14159, 20, 5)\n```\n\nWhen passed through the constructor, the values for `wordlength` and `precision` always take precedence over the\ncontext.\n\n```python\n>>> Fixd(pi, precision=10)\nFixd(3.1415926536, 256, 10)\n```\n\nNote that resulting data type has insufficinet range to represent the value pi.\n\n# Future Work\n\n* Support math operations for fixed-point types using the applicable context\n\n# Contributing\n\n## Package Installation\n```bash\n# Create virtual environment (recommended)\npython3 -m venv venv\nsource venv/bin/activate\n\n# Install in development mode\npip install -e .\n\n# Install with testing dependencies\npip install -e .[dev]  # if dev dependencies are defined\n```\n\n## Testing\n```bash\n# Run all tests\npytest\n\n# Run tests with tox (multiple Python versions)\ntox\n```\n\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "Apache License\n                                   Version 2.0, January 2004\n                                http://www.apache.org/licenses/\n        \n           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n        \n           1. Definitions.\n        \n              \"License\" shall mean the terms and conditions for use, reproduction,\n              and distribution as defined by Sections 1 through 9 of this document.\n        \n              \"Licensor\" shall mean the copyright owner or entity granting the License.\n        \n              \"Legal Entity\" shall mean the union of the acting entity and all\n              other entities that control, are controlled by, or are under common\n              control with that entity. For the purposes of this definition,\n              \"control\" means (i) the power, direct or indirect, to cause the\n              direction or management of such entity, whether by contract or\n              otherwise, or (ii) ownership of fifty percent (50%) or more of the\n              outstanding shares, or (iii) beneficial ownership of such entity.\n        \n              \"You\" (or \"Your\") shall mean an individual or Legal Entity\n              exercising permissions granted by this License.\n        \n              \"Source\" form shall mean the preferred form for making modifications,\n              including but not limited to software source code, documentation\n              source, and configuration files.\n        \n              \"Object\" form shall mean any form resulting from mechanical\n              transformation or translation of a Source form, including but\n              not limited to compiled object code, generated documentation,\n              and conversions to other media types.\n        \n              \"Work\" shall mean the work of authorship, whether in Source or\n              Object form, made available under the License, as indicated by a\n              copyright notice that is included in or attached to the work\n              (which shall not include communications that are conspicuously\n              marked or otherwise designated in writing by the copyright owner\n              as \"Not a Contribution\").\n        \n              \"Derivative Works\" shall mean any work, whether in Source or Object\n              form, that is based upon (or derived from) the Work and for which the\n              editorial revisions, annotations, elaborations, or other modifications\n              represent, as a whole, an original work of authorship. For the purposes\n              of this definition, an editorial revision, annotation, elaboration, or\n              other modification shall not constitute a Derivative Work, if such work\n              constitutes a separate and independent work of authorship in itself.\n        \n              \"Contribution\" shall mean any work of authorship, including\n              the original version of the Work and any modifications or additions\n              to that Work or Derivative Works thereof, that is intentionally\n              submitted to Licensor for inclusion in the Work by the copyright owner\n              or by an individual or Legal Entity authorized to submit on behalf of\n              the copyright owner. For the purposes of this definition, \"submitted\"\n              means any form of electronic, verbal, or written communication sent\n              to the Licensor or its representatives, including but not limited to\n              communication on electronic mailing lists, source code control\n              systems, and issue tracking systems that are managed by, or on behalf\n              of, the Licensor for the purpose of discussing and improving the Work,\n              but excluding communication that is conspicuously marked or otherwise\n              designated in writing by the copyright owner as \"Not a Contribution\".\n        \n              \"Contributor\" shall mean Licensor and any individual or Legal Entity\n              on behalf of whom a Contribution has been received by Licensor and\n              subsequently incorporated within the Work.\n        \n           2. Grant of Copyright License. Subject to the terms and conditions of\n              this License, each Contributor hereby grants to You a perpetual,\n              worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n              copyright license to use, reproduce, modify, distribute, and prepare\n              Derivative Works of, publicly display, publicly perform, sublicense,\n              and distribute the Work and such Derivative Works in Source or Object\n              form.\n        \n           3. Grant of Patent License. Subject to the terms and conditions of\n              this License, each Contributor hereby grants to You a perpetual,\n              worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n              (except as stated in this section) patent license to make, have made,\n              use, offer to sell, sell, import, and otherwise transfer the Work,\n              where such license applies only to those patent claims licensable\n              by such Contributor that are necessarily infringed by their\n              Contribution(s) alone or by combination of their Contribution(s)\n              with the Work to which such Contribution(s) was submitted. If You\n              institute patent litigation against any entity (including a\n              cross-claim or counterclaim in a lawsuit) alleging that the Work\n              or a Contribution incorporated within the Work constitutes direct\n              or contributory patent infringement, then any patent licenses\n              granted to You under this License for that Work shall terminate\n              as of the date such litigation is filed.\n        \n           4. Redistribution. You must give any other recipients of the Work or\n              Derivative Works a copy of this License; and You must cause any\n              modified files to carry prominent notices stating that You changed\n              the files; and You must retain, in the Source form of any Derivative\n              Works that You distribute, all copyright, trademark, patent,\n              attribution and disclaimer notices from the Source form of the Work,\n              excluding those notices that do not pertain to any part of the\n              Derivative Works; and If the Work includes a \"NOTICE\" text file as\n              part of its distribution, then any Derivative Works that You distribute\n              must include a readable copy of the attribution notices contained\n              within such NOTICE file, excluding those notices that do not pertain\n              to any part of the Derivative Works, in at least one of the following\n              places: within a NOTICE text file distributed as part of the Derivative\n              Works; within the Source form or documentation, if provided along\n              with the Derivative Works; or, within a display generated by the\n              Derivative Works, if and wherever such third-party notices normally\n              appear. The contents of the NOTICE file are for informational purposes\n              only and do not modify the License. You may add Your own attribution\n              notices within Derivative Works that You distribute, alongside or as an\n              addendum to the NOTICE text from the Work, provided that such additional\n              attribution notices cannot be construed as modifying the License.\n        \n              You may add Your own copyright notice to Your modifications and\n              may provide additional or different license terms and conditions\n              for use, reproduction, or distribution of Your modifications, or\n              for any such Derivative Works as a whole, provided Your use,\n              reproduction, and distribution of the Work otherwise complies with\n              the conditions stated in this License.\n        \n           5. Submission of Contributions. Unless You explicitly state otherwise,\n              any Contribution intentionally submitted for inclusion in the Work\n              by You to the Licensor shall be under the terms and conditions of\n              this License, without any additional terms or conditions.\n              Notwithstanding the above, nothing herein shall supersede or modify\n              the terms of any separate license agreement you may have executed\n              with Licensor regarding such Contributions.\n        \n           6. Trademarks. This License does not grant permission to use the trade\n              names, trademarks, service marks, or product names of the Licensor,\n              except as required for reasonable and customary use in describing the\n              origin of the Work and reproducing the content of the NOTICE file.\n        \n           7. Disclaimer of Warranty. Unless required by applicable law or\n              agreed to in writing, Licensor provides the Work (and each\n              Contributor provides its Contributions) on an \"AS IS\" BASIS,\n              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n              implied, including, without limitation, any warranties or conditions\n              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n              PARTICULAR PURPOSE. You are solely responsible for determining the\n              appropriateness of using or redistributing the Work and assume any\n              risks associated with Your exercise of permissions under this License.\n        \n           8. Limitation of Liability. In no event and under no legal theory,\n              whether in tort (including negligence), contract, or otherwise,\n              unless required by applicable law (such as deliberate and grossly\n              negligent acts) or agreed to in writing, shall any Contributor be\n              liable to You for damages, including any direct, indirect, special,\n              incidental, or consequential damages of any character arising as a\n              result of this License or out of the use or inability to use the\n              Work (including but not limited to damages for loss of goodwill,\n              work stoppage, computer failure or malfunction, or any and all\n              other commercial damages or losses), even if such Contributor\n              has been advised of the possibility of such damages.\n        \n           9. Accepting Warranty or Support. You may choose to offer, and to\n              charge a fee for, warranty, support, indemnity or other liability\n              obligations and/or rights consistent with this License. However, in\n              accepting such obligations, You may act only on Your own behalf and on\n              Your sole responsibility, not on behalf of any other Contributor, and\n              only if You agree to indemnify, defend, and hold each Contributor\n              harmless for any liability incurred by, or claims asserted against,\n              such Contributor by reason of your accepting any such warranty or support.\n        \n           END OF TERMS AND CONDITIONS\n        \n           APPENDIX: How to apply the Apache License to your work.\n        \n              To apply the Apache License to your work, attach the following\n              boilerplate notice, with the fields enclosed by brackets \"[]\"\n              replaced with your own identifying information. (Don't include\n              the brackets!)  The text should be enclosed in comment at the\n              beginning of each source file for clarity.\n        \n              Copyright [yyyy] [name of copyright owner]\n        \n              Licensed under the Apache License, Version 2.0 (the \"License\");\n              you may not use this file except in compliance with the License.\n              You may obtain a copy of the License at\n        \n                  http://www.apache.org/licenses/LICENSE-2.0\n        \n              Unless required by applicable law or agreed to in writing, software\n              distributed under the License is distributed on an \"AS IS\" BASIS,\n              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n              See the License for the specific language governing permissions and\n              limitations under the License.\n        \n        \n        Copyright 2021 PyDefi Development Team\n        \n        Licensed under the Apache License, Version 2.0 (the \"License\");\n        you may not use this file except in compliance with the License.\n        You may obtain a copy of the License at\n        \n            http://www.apache.org/licenses/LICENSE-2.0\n        \n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.",
    "summary": "Fixed-point data types for signal processing and blockchain applications",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/pydefi/chainfix",
        "Issues": "https://github.com/pydefi/chainfix/issues",
        "Repository": "https://github.com/pydefi/chainfix"
    },
    "split_keywords": [
        "fixed-point",
        " binary fixed-point",
        " decimal fixed-point"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9c31b08f47923b788ac396b53cd6f13d815ccb9fbd28117b89511b25eb8940fb",
                "md5": "6118305782293a83ea10dd1975435ea2",
                "sha256": "02451f2c76a2048712fff4983763cb555ab749e5679b1a83f206c384a5e8073b"
            },
            "downloads": -1,
            "filename": "chainfix-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6118305782293a83ea10dd1975435ea2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 17536,
            "upload_time": "2025-07-27T22:29:30",
            "upload_time_iso_8601": "2025-07-27T22:29:30.435086Z",
            "url": "https://files.pythonhosted.org/packages/9c/31/b08f47923b788ac396b53cd6f13d815ccb9fbd28117b89511b25eb8940fb/chainfix-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6a26f28a97d002534d36e71b891ffb459e362215f9487ebac5a36fcdf9a3d00e",
                "md5": "42b24ec8a6d91cec562526812d9b8047",
                "sha256": "677256fae27b348281768fb8b16f6b110c4ddbf3ca10835e9cdf756dc2bc9470"
            },
            "downloads": -1,
            "filename": "chainfix-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "42b24ec8a6d91cec562526812d9b8047",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17432,
            "upload_time": "2025-07-27T22:29:31",
            "upload_time_iso_8601": "2025-07-27T22:29:31.498123Z",
            "url": "https://files.pythonhosted.org/packages/6a/26/f28a97d002534d36e71b891ffb459e362215f9487ebac5a36fcdf9a3d00e/chainfix-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-27 22:29:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pydefi",
    "github_project": "chainfix",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "chainfix"
}
        
Elapsed time: 1.98619s