labelatorio


Namelabelatorio JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://github.com/blip-solutions/labelatorio-pyclient
SummaryLabelator.io python client
upload_time2023-05-24 21:50:09
maintainer
docs_urlNone
authorJuraj Bezdek
requires_python>=3.8
licenseMIT License
keywords client labelator-io
VCS
bugtrack_url
requirements requests dataclasses-json marshmallow pandas tqdm pydantic
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Labelator.io - python client
==========================

Python client for **[Labelator.io](https://www.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/get_token.png "Get your api token")


## Docs:
Full Labelator.io documentation can be found here [docs.labelator.io](https://docs.labelator.io)

Page dedicated this client can be found [here](https://docs.labelator.io/docs/integrations/python_sdk)

## Usage


### Connecting client

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

```

### Getting project info

Package requirements are handled using pip. To install them do

```python
# 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

```python
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

```python
# 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")

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/blip-solutions/labelatorio-pyclient",
    "name": "labelatorio",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "client labelator-io",
    "author": "Juraj Bezdek",
    "author_email": "juraj.bezdek@blip.solutions",
    "download_url": "https://files.pythonhosted.org/packages/df/5a/26f9d6d5516fa706d2a3c1df7574733fb6831cbc6f382fe7f908b686ea8c/labelatorio-0.4.1.tar.gz",
    "platform": null,
    "description": "Labelator.io - python client\n==========================\n\nPython client for **[Labelator.io](https://www.Labelator.io)** - labeling and ML training studio\n\n\n\n## Install\n```\npip install labelatorio\n```\n\n## Getting your API token\n![Click on \"user\" icon in the right-top corner, select \"User settings\". Click on Get API token. Copy token into clipboard. ](/docs/get_token.png \"Get your api token\")\n\n\n## Docs:\nFull Labelator.io documentation can be found here [docs.labelator.io](https://docs.labelator.io)\n\nPage dedicated this client can be found [here](https://docs.labelator.io/docs/integrations/python_sdk)\n\n## Usage\n\n\n### Connecting client\n\n``` python\n    import labelatorio\n    client = labelatorio.Client(api_token=\"your_api_token\")\n\n```\n\n### Getting project info\n\nPackage requirements are handled using pip. To install them do\n\n```python\n# get project by id\nexisting_project = client.projects.get(\"2fab1778-e8b1-4327-ac83-16dd0e783ab4\")\n\n# if you have just name\nexisting_project = client.projects.get_by_name(\"my name\")\n\n# or if you don't know the exact name\nexisting_project = client.projects.search(\"my name\")\n```\n\n### Adding, updating documents\n\n```python\ndf = pd.DataFrame({\n        \"key\":[\"first\",\"second\"], # mandatory\n        \"text\":[\"this is my first text\", \"completely different text...\"],  # mandatory\n        \"my_custom_column\":[\"note 1\",None] # optional\n        \"labels\":[[\"ClassA\"],None] #optional if you have labels - should be defined in project\n    })\n\nids = client.documents.add_documents(project_id, data=df)\n\nclient.documents.set_labels(project_id,ids[1],[\"ClassB\"])\n```\n\n### Quering documents\n\n```python\n# simple keyword search ... \nfound = client.documents.search(keyword=\"completely different\") \n\n# find all documents where \"ClassA\" was predicted\nfound = client.documents.search( predicted_label=\"ClassA\")\n\n# find all documents where \"ClassA\" was incorrectly predicted\nfound = client.documents.search( false_positives=\"ClassA\")\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Labelator.io python client",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/blip-solutions/labelatorio-pyclient"
    },
    "split_keywords": [
        "client",
        "labelator-io"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c80423383899cbc6f678d6f2947eccc22522a30d5a7bf3e768160adf1cb90b69",
                "md5": "51bdbd0795f2df3f4fe6d62bc39f2c11",
                "sha256": "1bb136e1529d5be4732339b31df6ff22f6d5c1c4d9e37350dccc8bf1e147a787"
            },
            "downloads": -1,
            "filename": "labelatorio-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51bdbd0795f2df3f4fe6d62bc39f2c11",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 17636,
            "upload_time": "2023-05-24T21:50:06",
            "upload_time_iso_8601": "2023-05-24T21:50:06.988555Z",
            "url": "https://files.pythonhosted.org/packages/c8/04/23383899cbc6f678d6f2947eccc22522a30d5a7bf3e768160adf1cb90b69/labelatorio-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df5a26f9d6d5516fa706d2a3c1df7574733fb6831cbc6f382fe7f908b686ea8c",
                "md5": "adc47941337a17fb0d1d203b21c5540d",
                "sha256": "03d9b533b1b44a1d670fca3ef97b78215002a9444265f9da59f8e283915dc132"
            },
            "downloads": -1,
            "filename": "labelatorio-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "adc47941337a17fb0d1d203b21c5540d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17334,
            "upload_time": "2023-05-24T21:50:09",
            "upload_time_iso_8601": "2023-05-24T21:50:09.360963Z",
            "url": "https://files.pythonhosted.org/packages/df/5a/26f9d6d5516fa706d2a3c1df7574733fb6831cbc6f382fe7f908b686ea8c/labelatorio-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-24 21:50:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "blip-solutions",
    "github_project": "labelatorio-pyclient",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "dataclasses-json",
            "specs": []
        },
        {
            "name": "marshmallow",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "pydantic",
            "specs": []
        }
    ],
    "lcname": "labelatorio"
}
        
Elapsed time: 1.18969s