polytope-databases
polytope-databases packages the SageMath databases of two- and
three-dimensional reflexive lattice polytopes as an ordinary, pure-Python
distribution. It has no dependency on SageMath and never accesses the network
at build time or run time.
The distribution contains two representations of the same catalogues:
- plain-text lists containing 16 two-dimensional and 4,319 three-dimensional reflexive polytopes; and
- the
Full2dandFull3ddatabases used by PALP.
The much larger four-dimensional database is deliberately out of scope.
Installation
Requires Python 3.13 or newer.
python -m pip install polytope-databases
The Python import name is polytope_databases.
Resource API
The API is based on importlib.resources, so callers do not need to know where
the wheel was installed:
from polytope_databases import (
open_reflexive_polytopes,
palp_database_path,
reflexive_polytopes,
)
# A Traversable resource, suitable for read_bytes(), read_text(), and open().
catalogue = reflexive_polytopes(3)
with open_reflexive_polytopes(2) as stream:
first_header = stream.readline()
# PALP needs a real filesystem directory. Keep the context open while PALP
# uses the path; resources from unusual zip importers may be temporary.
with palp_database_path(3) as directory:
palp_basename = directory / "zzdb"
The lower-level data_root(), resource(), open_resource(), and
resource_path() helpers are also public. Only dimensions 2 and 3 are accepted
by the dimension-specific helpers.
Data provenance and licensing
The three-dimensional list was originally obtained by Maximilian Kreuzer and Harald Skarke using PALP. See DATA_LICENSES.md for the available provenance and an important licensing caveat that must be resolved before the first public release.
Releases
Publishing a GitHub Release runs the Release GitHub Actions workflow. It
checks that the tag matches the package version, builds and validates the wheel
and source distribution, smoke-tests the wheel in a clean environment,
attaches both artifacts to the GitHub Release, and publishes them to PyPI
through Trusted Publishing. The Release tag must be 20170220.2 or
v20170220.2. Configure a PyPI Trusted Publisher for this repository, the
release.yml workflow, and the pypi environment before the first release.
The PyPI project name is polytope-databases, the GitHub owner is
sagemath, and the repository name is data-polytopes.
Do not publish a release until the data-license caveat above has been resolved.
Development
python -m pip install -e .
python -m pytest
python -m build
python tools/check_artifacts.py dist/*.whl dist/*.tar.gz
Migration from the previous package
This distribution replaces sagemath-data-polytopes. Install polytope-databases and change
imports from sage_data_polytopes to polytope_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 polytope-databases 20170220.2
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 |
|---|---|---|---|---|
| polytope_databases-20170220.2.tar.gz | 61.6 kB | With provenance | Details for polytope_databases-20170220.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| polytope_databases-20170220.2-py3-none-any.whl | Python 3 | none | any | Details for polytope_databases-20170220.2-py3-none-any.whl |
Total release size: 124.1 kB
Release files / polytope_databases-20170220.2.tar.gz
| Download URL | polytope_databases-20170220.2.tar.gz |
|---|---|
| Size | 61.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7793ad1f4dc4cf0a5d94fe3a6e8855ed7b055194c5c7b1305c862e0e609367b
|
|
BLAKE2b-256 checksum How to use checksums |
330d4acc73023decb8891530595cf229d647df0085457d8f1363b5643ace07cf
|
| 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 logRelease files / polytope_databases-20170220.2-py3-none-any.whl
| Download URL | polytope_databases-20170220.2-py3-none-any.whl |
|---|---|
| Size | 62.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3d192972a0ca87a522c23cbf40a67e3bb296a5535d48f10ef675b5289f25e2c
|
|
BLAKE2b-256 checksum How to use checksums |
53e2a3e94f049d359994d422841191cf7f476eea86592440afb6b2ec09ac5406
|
| 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 logSecurity for polytope-databases 20170220.2
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.
Attestation for polytope_databases-20170220.2.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 logA 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.