Skip to main content

No project description provided

Project description

Pyccel : write Python code, get Fortran speed

Linux unit tests MacOSX unit tests Windows unit tests Anaconda-Linux Anaconda-Windows Intel unit tests codacy DOI

Pyccel stands for Python extension language using accelerators.

The aim of Pyccel is to provide a simple way to generate automatically, parallel low level code. The main uses would be:

  1. Convert a Python code (or project) into a Fortran or C code.
  2. Accelerate Python functions by converting them to Fortran or C functions.

Pyccel can be viewed as:

  • Python-to-Fortran/C converter
  • a compiler for a Domain Specific Language with Python syntax

Pyccel comes with a selection of extensions allowing you to convert calls to some specific Python packages to Fortran/C. The following packages will be (partially) covered:

  • numpy
  • scipy

Pyccel's acceleration capabilities lead to much faster code. Comparisons of Python vs Pyccel or other tools can be found in the benchmarks repository. The results for the devel branch currently show the following performance on Python 3.10: Pyccel execution times for devel branch

If you are eager to try Pyccel out, we recommend reading our quick-start guide.

Citing Pyccel

If Pyccel has been significant in your research, and you would like to acknowledge the project in your academic publication, we would ask that you cite the following paper:

Bourne, Güçlü, Hadjout and Ratnani (2023). Pyccel: a Python-to-X transpiler for scientific high-performance computing. Journal of Open Source Software, 8(83), 4991, https://doi.org/10.21105/joss.04991

The associated bibtex can be found here.

Installation

Pyccel has a few system requirements to ensure that the system where it is installed is capable of compiling Fortran code. These requirements are detailed in the documentation. Once all requirements are satisfied, we recommend installing Pyccel into a Python virtual environment, which can be created with venv. Once the Python virtual environment is ready and activated, Pyccel can be easily installed using pip, the Python package installer. The simple command

pip install pyccel

will download the latest release of Pyccel from PyPI, the Python package index. Alternative installation methods such as installing from source, or installing with a docker, are described in the documentation.

Testing

It is good practice to test that Pyccel works as intended on the machine where it is installed. To this end Pyccel provides an extended test suite which can be downloaded from the official repository. Assuming the Python virtual environment is in the directory <ENV-PATH>, we activate it with

source <ENV-PATH>/bin/activate

and install the test component of the Pyccel package:

pip install "pyccel[test]"

This installs a few additional Python packages which are necessary for running the unit tests and getting a coverage report.

The recommended way of running the unit tests is simply using the command line tool pyccel-test which is installed with Pyccel. This runs all unit tests using Pytest under the hood.

Alternatively, if more fine-grained control over which tests are run is desired, e.g. for debugging local modifications to Pyccel, Pytest can be called directly using the commands provided in the documentation.

Contributing

We welcome any and all contributions.

There are many ways to help with the Pyccel project which are more or less involved. A summary can be found in the documentation.

We can also be contacted via the Pyccel Discord Server.

User Documentation

Developer Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyccel-2.0.1.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

pyccel-2.0.1-py3-none-any.whl (766.8 kB view details)

Uploaded Python 3

File details

Details for the file pyccel-2.0.1.tar.gz.

File metadata

  • Download URL: pyccel-2.0.1.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for pyccel-2.0.1.tar.gz
Algorithm Hash digest
SHA256 137a64d2db9cd69b290159855af61d8d73e70b3893c69c3c3f6e50d50c2be5d2
MD5 8fee21afba9bd135e30685c99803be37
BLAKE2b-256 b2b1c86a1a146c67a4127d865108c3128a4d773cca99a88df6276d41bb8a677c

See more details on using hashes here.

File details

Details for the file pyccel-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyccel-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 766.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for pyccel-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1fc611ad9cb2598f61b2eea36824de549c88d474b4f1184ad1769631ca4d0d54
MD5 28ed4baa48ddbe4afb3d2cc7293808e5
BLAKE2b-256 9357753ace44a46e477101d12ceaa1d08884b49bda884fff271331e027adb2bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page