Skip to main content

Utility that automates turning simple C classes into Python objects

Project description

Crelm

The Crelm package provides a relatively simple API around the CFFI system. Give it C code or source files, it gives you a package with bindings to functions and structs. Easiest way to get started is hack up the examples in the repo.

Installation

pip3 install crelm

Simple Demo

from crelm import Factory

paste = Factory(debug=False, verbose=True).create_Tube('add2') \
    .add_source_text('int add2(int a, int b) { return a + b; }') \
    .squeeze()

print(f'2 + 3 = {paste.add2(2, 3)}')

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

crelm-0.0.36.tar.gz (33.4 kB view hashes)

Uploaded Source

Built Distribution

crelm-0.0.36-py3-none-any.whl (34.7 kB view hashes)

Uploaded Python 3

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