Skip to main content

CythonBuilder; automated compiling and packaging of Cython code

Project description

CythonBuilder

CythonBuilder; automated compiling and packaging of Cython code

Version version
Package PythonVersion Platform License implementation
Status status DependencyStatus
Stats DownloadsCount
Social tweet twitterfollow

Installation

pip install cythonbuilder

How to use

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

With Commandline

Add -v (verbose) for more information

  1. Listing files with and without filter
cybuilder list
cybuilder list 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 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)
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
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 cythonbuilder import logger
from cythonbuilder 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:

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

cythonbuilder-0.1.9.tar.gz (15.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: cythonbuilder-0.1.9.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.1

File hashes

Hashes for cythonbuilder-0.1.9.tar.gz
Algorithm Hash digest
SHA256 55b4af4a88678e639ce55f605683bd57d694950a3b45576a35b81a403d8c3964
MD5 e591aa6f834bbd2444771b5b246bba9b
BLAKE2b-256 2c9ed799cbbb9ce6912aa83db8f57805ea54b9b7f742728c0b31a222c5f9fd07

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