Eratosthenes
Fast prime generation for Python based on Sieve of Eratosthenes
Usage
from eratosthenes import sieve, count, segmented_sieve, segmented_count
# This is a Sieve of Eratosthenes with wheel factorization.
primes = sieve(1000)
# This uses the same logic to count primes up the argument.
num_primes = count(1000)
# This segmented sieve only uses up to 128 KB main memory
primes = segmented_sieve(1000)
num_primes = segmented_count(1000)
About
Eratosthenes is written in C++17 and bound for Python with pybind11. This makes it faster than just about any native Python implementation of Sieve of Eratosthenes!
Copyright
Copyright (c) Daniel Strano and the Qrack contributors 2017-2024. All rights reserved.
Eratosthenes is provided under an MIT License.
Metadata
Release files for Eratosthenes 4.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eratosthenes-4.0.9.tar.gz | 8.0 kB | Without provenance | Details for eratosthenes-4.0.9.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Eratosthenes-4.0.9-cp312-cp312-manylinux_2_39_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.39+ x86-64 | Details for Eratosthenes-4.0.9-cp312-cp312-manylinux_2_39_x86_64.whl |
| Eratosthenes-4.0.9-cp310-cp310-manylinux_2_35_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.35+ x86-64 | Details for Eratosthenes-4.0.9-cp310-cp310-manylinux_2_35_x86_64.whl |
| Eratosthenes-4.0.9-cp38-cp38-manylinux_2_31_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.31+ x86-64 | Details for Eratosthenes-4.0.9-cp38-cp38-manylinux_2_31_x86_64.whl |
Total release size: 3.2 MB
Release files / eratosthenes-4.0.9.tar.gz
| Download URL | eratosthenes-4.0.9.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8dc2b739861c427218f9f026eaed59dc8925b5945459a7f8242efe2bd27b77c
|
|
BLAKE2b-256 checksum How to use checksums |
90875ff7b0f47157100e6995d19b376ee2bfae4f82686702ca117d1dbcf6ed28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Release files / Eratosthenes-4.0.9-cp312-cp312-manylinux_2_39_x86_64.whl
| Download URL | Eratosthenes-4.0.9-cp312-cp312-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
212700056a5177f5e678dad968d7cd8a96c4db4d5ed6c7505f56447165975d4b
|
|
BLAKE2b-256 checksum How to use checksums |
f9730e310057554190d92035b6bce15dd8e7ad6f4fa5722f25085e1af33a3ce7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Release files / Eratosthenes-4.0.9-cp310-cp310-manylinux_2_35_x86_64.whl
| Download URL | Eratosthenes-4.0.9-cp310-cp310-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
069eac35e593038d1409bfcef032c68f5cc56d96e50cad1b98faad75416b57c6
|
|
BLAKE2b-256 checksum How to use checksums |
94b1475fd605f02a449bafc5ade7b1ba436cdc4543da3652c2e5bb3027b5257e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Release files / Eratosthenes-4.0.9-cp38-cp38-manylinux_2_31_x86_64.whl
| Download URL | Eratosthenes-4.0.9-cp38-cp38-manylinux_2_31_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.8 Linux glibc 2.31+ x86-64 |
|
SHA-256 checksum How to use checksums |
8b9192621d840e39a2364c5b1fbc785574d1f6ca3782947ec355aeeb016cb1fe
|
|
BLAKE2b-256 checksum How to use checksums |
e0800e7cabc54e178bdbd7106c1022578f0c43dc2b10e4ee655066bcf2b0cd89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Security for Eratosthenes 4.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.