InfluxDBClient-rs icon indicating copy to clipboard operation
InfluxDBClient-rs copied to clipboard

Python binding?

Open hongquan opened this issue 7 years ago • 6 comments

Could you please add Python binding for this lib? Also add wheel package for ARM.

I would like to use it in ARM board, to replace the Python-pure client.

hongquan avatar Feb 08 '18 17:02 hongquan

Emmm ... it is a good idea to export this library to C lib and then wrap it for work in Python, I will try to do it but the completion time is indefinite.

If you want to use it immediately, I think this is a bad idea and it is welcome if you want to contribute.

driftluo avatar Feb 09 '18 04:02 driftluo

I also want to contribute but my Rust level is still very low (not even do trait and impl yet) .

cargo let you cross-compile to support ARM board. But I don't know how to tell setuptools to cross-compile.

For "export this library to C lib", I think it needs your side to expose some API as pub extern "C" fn and also define some C structures equivalent to Rust data type.

I've just read this and found that a Rust data type doesn't always have an equivalent in C.

hongquan avatar Feb 09 '18 08:02 hongquan

There is a library to Rust binding to Python, but currently only supports nightly, I don't very want to use it. Probably still use ffi export to do, but this seems a bit complicated.

driftluo avatar Feb 09 '18 08:02 driftluo

@driftluo Why not try https://github.com/dgrunwald/rust-cpython? This seems do not require nightly rust.

weaming avatar Mar 30 '19 17:03 weaming

Why don't you use this? https://github.com/influxdata/influxdb-python

faulesocke avatar Apr 11 '19 07:04 faulesocke

@weaming That rust-cpython requires to write very longer code.

@faulesocke Bad performance on low-end computer.

hongquan avatar Apr 11 '19 07:04 hongquan