Skip to main content

CythonBuilder; automated compiling and packaging of Cython code

Project description

CythonBuilder: automated compiling and packaging of Cython code

coverage Tests version dependencies PyPI Downloads versions
tweet xfollow

CythonBuilder makes it easy to use Cython in your Python project by automating the building process. You can use CythonBuilder from the commandline or import it as a package in Python. Generated files can be imported in Python directly

pip install cythonbuilder

Normal

Add -v (verbose) for more information

  1. Listing files with and without filter
cybuilder list
cybuilder list --files file1 file2.pyx
  1. Build with and without optional build arguments
cybuilder build
cybuilder build --include-numpy --no-annotation --no-cleanup
  1. Clean
cybuilder clean 
cybuilder clean --no-cleanup

With Python

  1. Listing files with and without filter
import cythonbuilder

print(cythonbuilder.cy_list())  # without a filter
print(cythonbuilder.cy_list(target_files=['some_name.pyx']))  # with a filter
  1. Build with and without optional build arguments (cleans automatically afterwards)
import cythonbuilder

cythonbuilder.cy_build()

found_files = cythonbuilder.cy_build(target_files=['some_name'])
cythonbuilder.cy_build(target_files=found_files, include_numpy=False, create_annotations=False)
  1. Clean
import cythonbuilder

cythonbuilder.cy_clean()

found_files = cythonbuilder.cy_build(target_files=['some_name'])
cythonbuilder.cy_clean(target_files=['some_name'])
  1. Setting debug level for verbose logging
import logging
from . import logger

logger.setLevel(logging.DEBUG)

In-depth, step by step Explanation

I've written a few articles that explain why Python is slow, why Cython can be a solution and how CythonBuilder helps us develop fast code easily:

Download files

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

Source Distribution

cythonbuilder-0.1.24.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

cythonbuilder-0.1.24-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file cythonbuilder-0.1.24.tar.gz.

File metadata

  • Download URL: cythonbuilder-0.1.24.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.29

File hashes

Hashes for cythonbuilder-0.1.24.tar.gz
Algorithm Hash digest
SHA256 d740d7efbc4f8f0612e64dfadf1a4e99a7031a43dbecfa6de054ffaaef1fbc92
MD5 0061011fe84b1a956fe3bfc7ba0a9d7a
BLAKE2b-256 30a7f8cd045f2245267624d9c8e9321c4445865fda3740d38ca66069824b4494

See more details on using hashes here.

File details

Details for the file cythonbuilder-0.1.24-py3-none-any.whl.

File metadata

File hashes

Hashes for cythonbuilder-0.1.24-py3-none-any.whl
Algorithm Hash digest
SHA256 aa5e7a697be568c0f072039904ed39536b0e7d69074151e069f086be7fc06318
MD5 988638477c2edde2c2cebd7b5c5bb597
BLAKE2b-256 2aeebf9d8ff26e22b4b05515f9143ee36f4b2fe7e6202e645b392c1f9500f9c7

See more details on using hashes here.

Supported by

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