Features for testing the presence of Python modules in the Sage library

sage.features.sagemath.all_features()

Return features corresponding to parts of the Sage library.

These features are named after Python packages/modules (e.g., sage.symbolic), not distribution packages (sagemath-symbolics).

This design is motivated by a separation of concerns: The author of a module that depends on some functionality provided by a Python module usually already knows the name of the Python module, so we do not want to force the author to also know about the distribution package that provides the Python module.

Instead, we associate distribution packages to Python modules in sage.features.sagemath via the spkg parameter of Feature.

EXAMPLES:

sage: from sage.features.sagemath import all_features
sage: list(all_features())
[...Feature('sage.combinat'), ...]
class sage.features.sagemath.sage__combinat

Bases: sage.features.join_feature.JoinFeature

A Feature describing the presence of sage.combinat.

EXAMPLES:

sage: from sage.features.sagemath import sage__combinat
sage: sage__combinat().is_present()  # optional - sage.combinat
FeatureTestResult('sage.combinat', True)
class sage.features.sagemath.sage__geometry__polyhedron

Bases: sage.features.PythonModule

A Feature describing the presence of sage.geometry.polyhedron.

EXAMPLES:

sage: from sage.features.sagemath import sage__geometry__polyhedron
sage: sage__geometry__polyhedron().is_present()  # optional - sage.geometry.polyhedron
FeatureTestResult('sage.geometry.polyhedron', True)
class sage.features.sagemath.sage__graphs

Bases: sage.features.join_feature.JoinFeature

A Feature describing the presence of sage.graphs.

EXAMPLES:

sage: from sage.features.sagemath import sage__graphs
sage: sage__graphs().is_present()  # optional - sage.graphs
FeatureTestResult('sage.graphs', True)
class sage.features.sagemath.sage__groups

Bases: sage.features.join_feature.JoinFeature

A sage.features.Feature describing the presence of sage.groups.

EXAMPLES:

sage: from sage.features.sagemath import sage__groups
sage: sage__groups().is_present()  # optional - sage.groups
FeatureTestResult('sage.groups', True)
class sage.features.sagemath.sage__plot

Bases: sage.features.join_feature.JoinFeature

A Feature describing the presence of sage.plot.

EXAMPLES:

sage: from sage.features.sagemath import sage__plot
sage: sage__plot().is_present()  # optional - sage.plot
FeatureTestResult('sage.plot', True)
class sage.features.sagemath.sage__rings__number_field

Bases: sage.features.join_feature.JoinFeature

A Feature describing the presence of sage.rings.number_field.

EXAMPLES:

sage: from sage.features.sagemath import sage__rings__number_field
sage: sage__rings__number_field().is_present()  # optional - sage.rings.number_field
FeatureTestResult('sage.rings.number_field', True)
class sage.features.sagemath.sage__rings__padics

Bases: sage.features.join_feature.JoinFeature

A sage.features.Feature describing the presence of sage.rings.padics.

EXAMPLES:

sage: from sage.features.sagemath import sage__rings__padics
sage: sage__rings__padics().is_present()  # optional - sage.rings.padics
FeatureTestResult('sage.rings.padics', True)
class sage.features.sagemath.sage__rings__real_double

Bases: sage.features.PythonModule

A Feature describing the presence of sage.rings.real_double.

EXAMPLES:

sage: from sage.features.sagemath import sage__rings__real_double
sage: sage__rings__real_double().is_present()  # optional - sage.rings.real_double
FeatureTestResult('sage.rings.real_double', True)
class sage.features.sagemath.sage__symbolic

Bases: sage.features.join_feature.JoinFeature

A Feature describing the presence of sage.symbolic.

EXAMPLES:

sage: from sage.features.sagemath import sage__symbolic
sage: sage__symbolic().is_present()  # optional - sage.symbolic
FeatureTestResult('sage.symbolic', True)
class sage.features.sagemath.sagemath_doc_html

Bases: sage.features.StaticFile

A Feature which describes the presence of the documentation of the Sage library in HTML format.

EXAMPLES:

sage: from sage.features.sagemath import sagemath_doc_html
sage: sagemath_doc_html().is_present()  # optional - sagemath_doc_html
FeatureTestResult('sagemath_doc_html', True)