Code Monkey home page Code Monkey logo

doccano-client's Introduction

Doccano API Client

A simple client wrapper for the doccano API.

Installation

To install doccano-client, simply run:

pip install doccano-client

Usage

  • Object instantiation takes care of session authorization.
  • All methods return a requests.models.Response object.
from doccano_api_client import DoccanoClient

# instantiate a client and log in to a Doccano instance
doccano_client = DoccanoClient(
    'http://doccano.example.com',
    'username',
    'password'
)

# get basic information about the authorized user
r_me = doccano_client.get_me()

# print the details from the above query
print(r_me)

# get the label text from project 1, label 3
label_text = doccano_client.get_label_detail(1, 3)['text']

# upload a json file to project 1. If file is in current directory, file_path is omittable
r_json_upload = doccano_client.post_doc_upload(1, 'json', 'file.json', '/path/to/file/without/filename/')

Completion

This wrapper's methods are based on doccano url paths.

Key:

  • ✔️ implemented
  • ❌ not implemented
  • ⚠️ currently broken or improperly implemented

Endpoint Names:

  • ✔️ auth-token
  • ✔️ me
  • ✔️ user_list
  • ✔️ roles
  • ✔️ features
  • ✔️ project_list
  • ✔️ project_detail
  • ✔️ statistics
  • ✔️ label_list
  • ✔️ label_detail
  • label_upload
  • ✔️ doc_list
  • ✔️ doc_detail
  • ✔️ doc_uploader
  • cloud_uploader
  • ✔️ approve_labels
  • ✔️ annotation_list
  • ⚠️ annotation_detail
  • ✔️ doc_downloader
  • ✔️ rolemapping_list
  • ⚠️ rolemapping_detail

To-Do

  • investigate more secure alternatives to plaintext login
  • improve docstrings

doccano-client's People

Contributors

afparsons avatar ayanamizuta avatar daleevans avatar dependabot[bot] avatar guigarfr avatar harmw avatar hironsan avatar kuraga avatar louisguitton avatar rolisz avatar youichiro 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.