This module provides bidirectional integration between Qore and Python, allowing:
- Qore code to call Python: Import Python modules, classes, and functions into Qore programs
- Python code to call Qore: Use the
qoreloadermodule to import Qore APIs into Python programs - Cross-language inheritance: Qore classes can inherit Python classes and vice-versa
- Qore 1.0+
- Python 3.11 - 3.16
- CMake 3.12+
- C++17 compatible compiler
mkdir build && cd build
cmake ..
make
make install%requires python
# Import Python's math module
%module-cmd(python) import math
# Use Python functions in Qore
float result = math::sin(1.0);
import qoreloader
from qore.SqlUtil import Table
# Use Qore classes in Python
t = Table("pgsql:user/pass@db", "my_table")Full documentation is available in the module's Doxygen documentation, generated during the build process.
Most source files are licensed under LGPL 2.1 or later; see COPYING.LGPL. Several supporting files also permit MIT licensing. The bundled CPython internal definitions retain Python's license; see COPYING.Python. The Debian copyright file identifies these components and their notices.
The canonical qore-python-module.spec builds the Qore module and the qoreloader
Python extension alias for Fedora, Enterprise Linux and openSUSE. See
rpm/README.rst for source preparation and installed-package tests.