Skip to main content

CythonBuilder; automated compiling and packaging of Cython code

Project description

CythonBuilder: automated compiling and packaging of Cython code

Testing coverage
Package PyPI Latest Release PyPI Downloads
status dependencies
Meta GitHub License implementation versions
Social 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
from cythonbuilderr import cythonbuilder as cybuilder

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

cybuilder.cy_build()

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

cybuilder.cy_clean()

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

set_logger_debug_mode(logger=logger)

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.23.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

cythonbuilder-0.1.23-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cythonbuilder-0.1.23.tar.gz
Algorithm Hash digest
SHA256 d6fc4c2e046e9b1d897665cd0597dacc095da7dc140978a3eaac9af7b3b3b89c
MD5 50b9c35a8b7f35e7b7a2a90f14018e19
BLAKE2b-256 c8b3931cc8ffe2a310b5e32ba74efa8a62c574d871689110be936d0911346303

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cythonbuilder-0.1.23-py3-none-any.whl
Algorithm Hash digest
SHA256 5af06e69470c606f74cb62cceef2157a8dabb19fc2bdf51e4885d8ad3e74ff4e
MD5 d0681d4fd48c012adcbb4c5f48092555
BLAKE2b-256 5c5786053fef1a3b30c3e4c46f825689faf424c82eab29e3ac6c1419dcedc5a2

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