GithubHelp home page GithubHelp logo

rlugojr / refine-client-py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paulmakepeace/refine-client-py

0.0 1.0 0.0 679 KB

The OpenRefine Python Client Library provides an interface to communicating with an OpenRefine server.

Home Page: https://github.com/PaulMakepeace/refine-client-py

License: GNU General Public License v3.0

Makefile 1.00% Python 99.00%

refine-client-py's Introduction

OpenRefine Python Client Library

The OpenRefine Python Client Library provides an interface to communicating with an OpenRefine server.

Currently, the following API is supported:

  • project creation/import, deletion, export
  • facet computation
    • text
    • text filter
    • numeric
    • blank
    • starred & flagged
    • ... extensible class
  • 'engine': managing multiple facets and their computation results
  • sorting & reordering
  • clustering
  • transforms
  • transposes
  • single and mass edits
  • annotation (star/flag)
  • column
    • move
    • add
    • split
    • rename
    • reorder
    • remove
  • reconciliation
    • reconciliation judgment facet
    • guessing column type
    • querying reconciliation services preferences
    • perform reconciliation

Configuration

By default the OpenRefine server URL is http://127.0.0.1:3333 The environment variables OPENREFINE_HOST and OPENREFINE_PORT enable overriding the host & port.

In order to run all tests, a live Refine server is needed. No existing projects are affected.

Installation

(Someone with more familiarity with python's byzantine collection of installation frameworks is very welcome to improve/"best practice" all this.)

  1. Install dependencies, which currently is urllib2_file:

    sudo pip install -r requirements.txt

    (If you don't have pip visit pip-installer.org)

  2. Ensure you have a Refine server running somewhere and, if necessary, set the environment vars as above.

  3. Run tests, build, and install:

    python setup.py test # to do a subset, e.g., --test-suite tests.test_facet

    python setup.py build

    python setup.py install

There is a Makefile that will do this too, and more.

TODO

The API so far has been filled out from building a test suite to carry out the actions in David Huynh's Refine tutorial which while certainly showing off a wide range of Refine features doesn't cover the entire suite. Notable exceptions currently include:

  • reconciliation support is useful but not complete
  • undo/redo
  • Freebase
  • join columns
  • columns from URL

Contribute

Pull requests with passing tests welcome! Source is at https://github.com/PaulMakepeace/refine-client-py

Useful Tools

One aspect of development is watching HTTP transactions. To that end, I found Fiddler on Windows and HTTPScoop invaluable. The latter won't URL-decode nor nicely format JSON but the Online JavaScript Beautifier will.

History

OpenRefine used to be called Google Refine, and this library used to be called the Google Refine Python Client Library.

Credits

Paul Makepeace, author, <[email protected]>

David Huynh, initial cut

Artfinder, inspiration

Some data used in the test suite has been used from publicly available sources,

refine-client-py's People

Contributors

armisael avatar paulmakepeace avatar vad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.