Skip to main content

Type stubs for gmpy2

Project description

gmpy2-stubs

PyPI version

Type stubs for the gmpy2 library (version 2.2.1).

gmpy2 is a C-coded Python extension module that supports multiple-precision arithmetic. It provides access to the GMP (GNU Multiple Precision Arithmetic Library), MPFR (Multiple-Precision Floating-Point Reliable Library), and MPC (Multiple-Precision Complex Library) libraries. gmpy2 itself does not include type hints. This package provides them.

Installation

pip install gmpy2-stubs

or, if you'd like to use a specific version.

pip install gmpy2-stubs==2.2.1.0

Usage

These stubs are automatically used by mypy and other type checkers when you have both gmpy2 and gmpy2-stubs installed. You do not need to import anything from gmpy2-stubs directly.

import gmpy2

# Type hints are available here!
x = gmpy2.mpz(123)
y = gmpy2.sqrt(x)
print(y)

Contributing

Contributions and improvements to these stubs are very welcome!

License

These stubs are licensed under the MIT License (see the LICENSE file). gmpy2 itself is licensed under the LGPLv3+ license.

Author:

David Osipov (personal@david-osipov.vision)

Acknowledgements

Thanks to the gmpy2 developers for creating this powerful library!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gmpy2_stubs-2.2.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gmpy2_stubs-2.2.1.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file gmpy2_stubs-2.2.1.0.tar.gz.

File metadata

  • Download URL: gmpy2_stubs-2.2.1.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for gmpy2_stubs-2.2.1.0.tar.gz
Algorithm Hash digest
SHA256 468419818eeb11501b06bc7a40893e3a774013b4c70ab209b2997ffe8f605382
MD5 d751a23c7f1f0b5d0e001621e89bdea3
BLAKE2b-256 d9f53145c7b044621651d31629af0f75117bca0abddb35ecec162e2e935a3631

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmpy2_stubs-2.2.1.0.tar.gz:

Publisher: pypi-publish.yml on DavidOsipov/gmpy2-stubs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gmpy2_stubs-2.2.1.0-py3-none-any.whl.

File metadata

  • Download URL: gmpy2_stubs-2.2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for gmpy2_stubs-2.2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13d0e2f353990c725ce6d63c70ef81cfe175230b81acf8a2f1fec23185d9ba64
MD5 826ea8868462d558b4df4c9043024ffd
BLAKE2b-256 41eefb38f18d440e3d847d7a751f29c5ae24d45247e8d565956c49b8d393260b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmpy2_stubs-2.2.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on DavidOsipov/gmpy2-stubs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page