Python implementation of openrefine

815 views
Skip to first unread message

Azfar Faizan

unread,
Sep 26, 2016, 5:37:02 AM9/26/16
to OpenRefine
Hi, I am new to openrefine and  I have installed the refine-client library for running it in python 3. But i do not have clear documentation about the methods and classes and how should we use them. Can anyone help me out in getting some quality documentation from which I can learn it. 

I have worked with the exe file and do data cleaning manually but do not know how to learn my algorithm on top of openrefine. 

Thanks in advance for your help.

Faizan

Martin Magdinier

unread,
Oct 11, 2016, 9:12:35 AM10/11/16
to openrefine
Sorry for the late reply. 
Which library are you using? The refine-client-py or the refine-python
AFAIK, most people use the library to batch process a file by passing a JSON file containing all the OpenRefine operation. 


Martin

--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lan Li

unread,
Oct 16, 2018, 3:22:16 AM10/16/18
to OpenRefine
Hi, can I ask you how are you running it on python3?
Thank you very much!

在 2016年9月26日星期一 UTC-5上午4:37:02,Azfar Faizan写道:

Ettore Rizza

unread,
Oct 16, 2018, 1:25:16 PM10/16/18
to OpenRefine
Hello,

I personally use this fork of refine-client.py in command line, but it can also be used in a Python script. It seems a little better documented.

Lan Li

unread,
Oct 17, 2018, 11:35:04 AM10/17/18
to openr...@googlegroups.com
Hi,
Thanks! But 

--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.

Lan Li

unread,
Oct 17, 2018, 11:36:20 AM10/17/18
to openr...@googlegroups.com
But I also use this or-client library, and need to use python2 to set up this, so i wonder if you have changed the urllib2_file library with some other python3 library?
Best,
Lan

On Tue, Oct 16, 2018 at 12:25 PM Ettore Rizza <ettor...@gmail.com> wrote:
--

Ettore Rizza

unread,
Oct 21, 2018, 6:53:17 AM10/21/18
to OpenRefine
Hello, 

sorry for my delayed response. You're right, using this library in Python 3 would need to rewrite it in part. As I said, I use it in command lines with the executable version for Windows. I guess it should be possible to use it in a Python3 script with something like:

import subprocess

#modify just this part
command_line
= "openrefine-client_0-3-4_windows.exe --list"

result
= subprocess.run(command_line, shell=True, stdout=subprocess.PIPE).stdout.decode('utf8')

print(result)

Just a workaround, but it should maybe help. 

Ettore

Lan Li

unread,
Oct 21, 2018, 9:13:15 AM10/21/18
to openr...@googlegroups.com
Thank you so much for your kind help !
Have a good day!
Reply all
Reply to author
Forward
0 new messages