Skip to main content

Labelator.io - python client

Python client for Labelator.io - labeling and ML training studio

Install

pip install labelatorio

Getting your API token

Click on "user" icon in the right-top corner, select "User settings". Click on Get API token. Copy token into clipboard.

Docs:

Full Labelator.io documentation can be found here docs.labelator.io

Page dedicated this client can be found here

Usage

Connecting client

    import labelatorio
    client = labelatorio.Client(api_token="your_api_token")

Getting project info

Package requirements are handled using pip. To install them do

# get project by id
existing_project = client.projects.get("2fab1778-e8b1-4327-ac83-16dd0e783ab4")

# if you have just name
existing_project = client.projects.get_by_name("my name")

# or if you don't know the exact name
existing_project = client.projects.search("my name")

Adding, updating documents

df = pd.DataFrame({
        "key":["first","second"], # mandatory
        "text":["this is my first text", "completely different text..."],  # mandatory
        "my_custom_column":["note 1",None] # optional
        "labels":[["ClassA"],None] #optional if you have labels - should be defined in project
    })

ids = client.documents.add_documents(project_id, data=df)

client.documents.set_labels(project_id,ids[1],["ClassB"])

Quering documents

# simple keyword search ... 
found = client.documents.search(keyword="completely different") 

# find all documents where "ClassA" was predicted
found = client.documents.search( predicted_label="ClassA")

# find all documents where "ClassA" was incorrectly predicted
found = client.documents.search( false_positives="ClassA")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labelatorio-0.4.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labelatorio-0.4.1-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file labelatorio-0.4.1.tar.gz.

File metadata

  • Download URL: labelatorio-0.4.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for labelatorio-0.4.1.tar.gz
Algorithm Hash digest
SHA256 03d9b533b1b44a1d670fca3ef97b78215002a9444265f9da59f8e283915dc132
MD5 adc47941337a17fb0d1d203b21c5540d
BLAKE2b-256 df5a26f9d6d5516fa706d2a3c1df7574733fb6831cbc6f382fe7f908b686ea8c

See more details on using hashes here.

File details

Details for the file labelatorio-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: labelatorio-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for labelatorio-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1bb136e1529d5be4732339b31df6ff22f6d5c1c4d9e37350dccc8bf1e147a787
MD5 51bdbd0795f2df3f4fe6d62bc39f2c11
BLAKE2b-256 c80423383899cbc6f678d6f2947eccc22522a30d5a7bf3e768160adf1cb90b69

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page