primePy
This module contains several useful functions to work with prime numbers. from primePy import primes
Decision gist · record as of 2026-08-14
Yes, with strong conditions. Install only if you need a lightweight, dependency-free prime utility for educational or experimental use and can tolerate the lack of maintenance. The MIT license and low install friction are advantages, and no known vulnerabilities exist. However, do not use in production or long-term projects—the package is abandoned, and there is no guarantee of compatibility with current or future Python versions. For active development, consider a maintained alternative.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- However, the package is abandoned—last release and commit were in 2018, with no maintenance activity for years.
- Use only if you need a stable, self-contained prime utility and can accept no future updates or bug fixes.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute freely with minimal restrictions. No licensing barrier to adoption.
last release 2018-05-29 (2999 days) · last repo commit 2022-04-25 · 3 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,138,753 downloads/mo, #3,261 on PyPI
Alternatives
Verify before relying
pip install primePy
from primePy import primes
# Check if a number is prime
print(primes.check(79012338765433))
# Get all prime factors with multiplicity
print(primes.factors(252))
# Get first n primes
print(primes.first(7))
# Get all primes up to n
print(primes.upto(16))
# Get primes between m and n
print(primes.between(100, 200))
# Compute Euler's totient
print(primes.phi(128))- Whether the package handles edge cases (negative numbers, zero, one) as documented
- Performance characteristics on modern hardware and Python versions beyond the 2018 test environment
- Compatibility with Python versions released after 2018 despite 'Programming Language :: Python :: 3' classifier
What it is and what it does
primePy is a pure-Python module for prime number operations: testing primality, extracting prime factors with multiplicity, generating sequences of primes, and computing Euler's totient function. It exposes a simple API through the `primes` module with methods like `check()`, `factor()`, `factors()`, `first()`, `upto()`, `between()`, and `phi()`. The package has no external runtime dependencies and installs as a single wheel.
The module was designed for reasonable performance on moderate-sized integers (demonstrated on numbers up to around 10^14 and factorizations completing within seconds). However, the package has been abandoned since its single release on 2018-05-29, with no maintenance, bug fixes, or compatibility updates for modern Python environments. It remains functional for basic number-theoretic tasks but carries the risk of incompatibility with future Python versions and no recourse for issues.
Use it for
- Educational projects or scripts that need basic primality testing and factorization without external dependencies
- Cryptographic prototyping or number-theory experiments where you need quick prime generation and Euler's totient
- Competitive programming or mathematical problem-solving requiring fast prime enumeration up to moderate bounds
- Legacy systems or offline environments where a self-contained, dependency-free prime utility is preferred
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with strong conditions.
Install only if you need a lightweight, dependency-free prime utility for educational or experimental use and can tolerate the lack of maintenance. The MIT license and low install friction are advantages, and no known vulnerabilities exist. However, do not use in production or long-term projects—the package is abandoned, and there is no guarantee of compatibility with current or future Python versions. For active development, consider a maintained alternative.
Install
primepy on PyPI
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release and commit were in 2018, with no maintenance activity for years. Use only if you need a stable, self-contained prime utility and can accept no future updates or bug fixes.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute freely with minimal restrictions. No licensing barrier to adoption.
Quickstart
pip install primePy
from primePy import primes
# Check if a number is prime
print(primes.check(79012338765433))
# Get all prime factors with multiplicity
print(primes.factors(252))
# Get first n primes
print(primes.first(7))
# Get all primes up to n
print(primes.upto(16))
# Get primes between m and n
print(primes.between(100, 200))
# Compute Euler's totient
print(primes.phi(128))
Verify before relying
- Whether the package handles edge cases (negative numbers, zero, one) as documented
- Performance characteristics on modern hardware and Python versions beyond the 2018 test environment
- Compatibility with Python versions released after 2018 despite 'Programming Language :: Python :: 3' classifier
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 2,999 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,138,753 / month, #3,261 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: primePy-1.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “prime number checker”
- primePyProvides functions to test primality, factor integers, generate prime…
- prime-tunnelExposes local services via secure tunnels on Prime infrastructure,…
- primeCLI and Python SDK for managing GPU compute, sandboxes, training…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also fprime-visual · permutation · fprime-fpp · pyudorandom · prime · galois · fprime-tools · paretoset · lightecc · cysignals