Skip to main content

elliptic-curve-databases

elliptic-curve-databases packages two small, read-only elliptic-curve databases historically distributed as SageMath's elliptic_curves package:

  • John Cremona's elliptic curves of conductor below 10,000, represented as a compact SQLite database; and
  • William Stein's collection of interesting elliptic curves, combined with the Cremona records and grouped into text files by rank.

The package has no dependency on SageMath. It exposes the data through importlib.resources, so consumers do not need to know where the wheel was installed.

Install

Requires Python 3.13 or newer.

python -m pip install elliptic-curve-databases

The Python import name is elliptic_curve_databases.

Use

from elliptic_curve_databases import (
    available_ranks,
    cremona_mini_connection,
    iter_rank,
)

print(available_ranks())

record = next(iter_rank(3))
print(record.label, record.ainvs)

with cremona_mini_connection() as connection:
    row = connection.execute(
        "SELECT curve, eqn FROM t_curve WHERE curve = ?", ("11a1",)
    ).fetchone()
    print(row)

cremona_mini_resource() and rank_resource(rank) return standard importlib.resources traversables. For APIs that require filesystem paths, use the cremona_mini_path() and rank_path(rank) context managers; their paths are valid only while the corresponding context is active.

Regenerate the packaged data

The unmodified legacy inputs are retained under sources/. Regenerate all derived resources with:

python generate.py

Check that the committed resources are logically identical to a fresh generation without modifying them:

python generate.py --check

The SQLite comparison is logical rather than byte-for-byte because SQLite file layout can vary across SQLite releases.

Develop

python -m pip install -e '.[test]'
python generate.py --check
python -m pytest
python -m build

After the data terms are confirmed, publishing is performed only by the Release GitHub Actions workflow when a GitHub Release is published. The workflow checks the generated databases, builds and validates both distributions, smoke-tests the wheel in a clean environment, attaches the artifacts to that Release, and uses PyPI Trusted Publishing through the protected pypi environment. The Release tag must be 0.8.3 or v0.8.3. Configure the repository, release.yml workflow, and pypi environment as a PyPI Trusted Publisher before publishing the first Release.

For the new PyPI project, configure a pending Trusted Publisher with project elliptic-curve-databases, GitHub owner sagemath, repository data-elliptic-curves, workflow filename release.yml, and environment pypi.

Migration from the previous package

This distribution replaces sagemath-data-elliptic-curves. Install elliptic-curve-databases and change imports from sage_data_elliptic_curves to elliptic_curve_databases. The resource helpers and bundled database contents are unchanged. The two distributions use separate import namespaces and can coexist while consumers migrate.

Metadata

Release files for elliptic-curve-databases 0.8.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elliptic-curve-databases 0.8.3
File Size Uploaded Provenance Actions
elliptic_curve_databases-0.8.3.tar.gz 5.0 MB With provenance Details for elliptic_curve_databases-0.8.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for elliptic-curve-databases 0.8.3
File Interpreter ABI Platform Actions
elliptic_curve_databases-0.8.3-py3-none-any.whl Python 3 none any Details for elliptic_curve_databases-0.8.3-py3-none-any.whl

Total release size: 9.3 MB

Release files / elliptic_curve_databases-0.8.3.tar.gz

Download URL elliptic_curve_databases-0.8.3.tar.gz
Size 5.0 MB
Tags Source
SHA-256 checksum
How to use checksums
5a2bf93c9f92a0c010c911c7ebe2a3af0275f9f11e86894ba00810887b04daa7
BLAKE2b-256 checksum
How to use checksums
00c23a36dafcbb97c8e6489e93523fd68425db4572cc3c4889741c2e99b3837d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / elliptic_curve_databases-0.8.3-py3-none-any.whl

Download URL elliptic_curve_databases-0.8.3-py3-none-any.whl
Size 4.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
966179be782f008dd181035d32d7db8f575f85bfc03d4c70778a4a17b78bf187
BLAKE2b-256 checksum
How to use checksums
2fe14772eeab51901f8b1fd9a7fe8c7417b5fd69846acd474d0231baeadf1f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for elliptic-curve-databases 0.8.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for elliptic_curve_databases-0.8.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.8.3 This release

2 release files Full provenance

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