--- id: python-flint version: "0.9.0" license: MIT AND LGPL-3.0-or-later license_treatment: copyleft maintenance: active --- # python-flint — Bindings for FLINT License: copyleft · Maintenance: active · Downloads: 86.1K/mo ## What it is and what it does Python-FLINT is a Python extension module that wraps FLINT (Fast Library for Number Theory) and Arb (arbitrary-precision ball arithmetic), exposing exact integer, rational, and modular arithmetic alongside arbitrary-precision real and complex numbers with rigorous error bounds. It provides polynomial, power series, and matrix types over all these number systems, plus a large collection of mathematical functions including number-theoretic operations, factorization, and numerical integration. The library is designed for applications requiring exact symbolic computation or certified numerical results. It supports CPython 3.10–3.14 and provides prebuilt wheels for common platforms; source builds are available for other architectures. The package has no runtime Python dependencies and relies on the underlying FLINT C library, making it suitable for both interactive use and embedded in larger applications. Use it for: - Compute exact number-theoretic functions like partition counts and Bernoulli numbers without floating-point error. - Perform polynomial arithmetic (GCD, factorization, evaluation) over exact integer and rational coefficients. - Work with matrices of exact rationals or modular integers, including determinant and LLL reduction. - Evaluate special functions and integrals with certified error bounds using arbitrary-precision ball arithmetic. - Prototype symbolic mathematics computations before translating to production systems. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python bindings for FLINT and Arb that provide exact integer and rational arithmetic, arbitrary-precision real and complex numbers with error tracking, and polynomial, power series, and matrix operations over these types. Yes, if you need exact arithmetic or certified numerical results. The package is actively maintained, has no known vulnerabilities, and provides prebuilt wheels for modern Python versions on common platforms. Install friction is moderate due to the compiled FLINT dependency, but wheels eliminate build complexity for supported platforms. Dual licensing (MIT/LGPL-3.0-or-later) requires attention to copyleft obligations if redistributing derivative works. ## Install pip install python-flint uv add python-flint poetry add python-flint ## Installing python-flint Before you install: Prebuilt wheels available for CPython 3.10–3.14 on Windows, macOS, and Linux; medium install friction due to compiled C extension dependency on FLINT 3.0 or later, which may require system package installation or source build on unsupported platforms. License in practice: Dual-licensed under MIT and LGPL-3.0-or-later; copyleft treatment means derivative works must comply with LGPL-3.0-or-later terms if distributed, though MIT applies to some components. Quickstart: pip install python-flint from flint import fmpz, fmpq, fmpz_poly # Integer arithmetic print(fmpz(1000).partitions_p()) # Rational arithmetic print(fmpq.bernoulli(64)) # Polynomial GCD a = fmpz_poly([1, 2, 3]) b = fmpz_poly([2, 3, 4]) print(a.gcd(a * b)) Requires FLINT 3.0 or later to be installed on the system; prebuilt wheels available for CPython 3.10–3.14 on Windows (x86-64), macOS (x86-64, arm64), and Linux (x86-64, aarch64). Verify before relying: - Performance characteristics compared to other arbitrary-precision libraries for specific workloads. - Stability and completeness of free-threaded (no-GIL) build support marked as experimental. - Extent of missing FLINT type wrappings (finite field matrices, p-adic numbers, rational functions). ## Package facts - License: MIT AND LGPL-3.0-or-later (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 86.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags arbitrary precision arithmetic, number theory library, exact rational computation, polynomial arithmetic, rigorous error tracking, matrix operations exact, FLINT bindings, exact-arithmetic, number-theory, symbolic-computation [View on SkillFed](https://skillfed.io/packages/python-flint) · [View on PyPI](https://pypi.org/project/python-flint/)