Skip to main content

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)

Source distribution for Eratosthenes 4.0.9
File Size Uploaded
eratosthenes-4.0.9.tar.gz 8.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for Eratosthenes 4.0.9
File Interpreter ABI Platform
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
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
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

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

Release history Release notifications | RSS feed

This release

4.0.9 This release

4 release files

4.0.8

4 release files

4.0.7

4 release files

4.0.6

4 release files

4.0.5

4 release files

4.0.4

4 release files

4.0.3

4 release files

4.0.2

4 release files

4.0.1

4 release files

4.0.0

4 release files

3.0.13

4 release files

3.0.12

4 release files

3.0.9

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.0

2 release files

2.1.10

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page