{"id":21198652,"url":"https://github.com/natlibfi/annif-client","last_synced_at":"2025-07-10T06:30:39.336Z","repository":{"id":53940391,"uuid":"153239699","full_name":"NatLibFi/Annif-client","owner":"NatLibFi","description":"Python client library for accessing Annif REST API","archived":false,"fork":false,"pushed_at":"2023-08-31T07:27:45.000Z","size":47,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-28T13:52:32.271Z","etag":null,"topics":["annif"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NatLibFi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-16T07:15:22.000Z","updated_at":"2023-10-22T17:40:04.000Z","dependencies_parsed_at":"2022-08-13T05:10:26.134Z","dependency_job_id":null,"html_url":"https://github.com/NatLibFi/Annif-client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/NatLibFi/Annif-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLibFi","download_url":"https://codeload.github.com/NatLibFi/Annif-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264538580,"owners_count":23624436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annif"],"created_at":"2024-11-20T19:52:49.076Z","updated_at":"2025-07-10T06:30:39.055Z","avatar_url":"https://github.com/NatLibFi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Annif-client\n\nThis is a minimal Python 3.x client library for accessing the\n[Annif](http://annif.org) REST API which can be used for automated subject\nindexing and classification of text documents.\n\n## Installation\n\nThe easiest way to install is via pip:\n\n    pip3 install annif-client\n\n## Dependencies\n\nThe library depends on the\n[requests](http://docs.python-requests.org/en/master/#) module which is used\nfor HTTP/REST access. If you install this via pip, the dependencies will be\nhandled automatically.\n\n## How to use\n\nThe client library comes with examples demonstrating its usage. You can invoke\nthe example by running the [annif_client.py](annif_client.py) script.\n\nIn your own code, you can use the AnnifClient class like this:\n\n    from annif_client import AnnifClient\n\n    # then you can create your own client\n    annif = AnnifClient()\n\n## Example invocation\n\nHere is the output from a typical example session:\n\n    $ python3 annif_client.py\n    Demonstrating usage of AnnifClient\n\n    * Creating an AnnifClient object\n    * The client uses Annif API at https://api.annif.org/v1/\n    * The version of Annif serving the API is 0.61.0\n\n    * Finding the available projects\n    Project id: yso-fi           lang: fi  name: YSO NN ensemble Finnish\n    Project id: yso-sv           lang: sv  name: YSO NN ensemble Swedish\n    Project id: yso-en           lang: en  name: YSO NN ensemble English\n    Project id: yso-mllm-fi      lang: fi  name: YSO MLLM Finnish\n    Project id: yso-mllm-en      lang: en  name: YSO MLLM English\n    Project id: yso-mllm-sv      lang: sv  name: YSO MLLM Swedish\n    Project id: yso-bonsai-fi    lang: fi  name: YSO Omikuji Bonsai Finnish\n    Project id: yso-bonsai-sv    lang: sv  name: YSO Omikuji Bonsai Swedish\n    Project id: yso-bonsai-en    lang: en  name: YSO Omikuji Bonsai English\n    Project id: yso-fasttext-fi  lang: fi  name: YSO fastText Finnish\n    Project id: yso-fasttext-sv  lang: sv  name: YSO fastText Swedish\n    Project id: yso-fasttext-en  lang: en  name: YSO fastText English\n\n    * Looking up information about a specific project\n    Project id: yso-en           lang: en  name: YSO NN ensemble English\n\n    * Analyzing a short text from a string\n    \u003chttp://www.yso.fi/onto/yso/p5319\u003e\t0.2852\tdog\n    \u003chttp://www.yso.fi/onto/yso/p8122\u003e\t0.1401\tlaziness\n    \u003chttp://www.yso.fi/onto/yso/p2228\u003e\t0.1052\tred fox\n    \u003chttp://www.yso.fi/onto/yso/p2352\u003e\t0.0914\tsingers\n    \u003chttp://www.yso.fi/onto/yso/p675\u003e\t0.0679\tpets\n    \u003chttp://www.yso.fi/onto/yso/p27825\u003e\t0.0651\tjumping\n    \u003chttp://www.yso.fi/onto/yso/p25726\u003e\t0.0631\tbrown\n    \u003chttp://www.yso.fi/onto/yso/p2023\u003e\t0.0584\tanimals\n    \u003chttp://www.yso.fi/onto/yso/p4484\u003e\t0.0453\tjazz\n    \u003chttp://www.yso.fi/onto/yso/p22993\u003e\t0.0357\tclicker training\n\n    * Analyzing a longer text from a file, with a limit on number of results\n    \u003chttp://www.yso.fi/onto/yso/p2346\u003e\t0.6324\tcopyright\n    \u003chttp://www.yso.fi/onto/yso/p16495\u003e\t0.4211\tlicences (permits)\n    \u003chttp://www.yso.fi/onto/yso/p26592\u003e\t0.1882\tcomputer programmes\n    \u003chttp://www.yso.fi/onto/yso/p3069\u003e\t0.1434\tpatents\n    \u003chttp://www.yso.fi/onto/yso/p3068\u003e\t0.1044\tintellectual property law\n\n    * Analyzing a batch of text documents\n    doc-0\n    \u003chttp://www.yso.fi/onto/yso/p5319\u003e\t0.2852\tdog\n    \u003chttp://www.yso.fi/onto/yso/p8122\u003e\t0.1401\tlaziness\n    \u003chttp://www.yso.fi/onto/yso/p2228\u003e\t0.1052\tred fox\n    \u003chttp://www.yso.fi/onto/yso/p2352\u003e\t0.0914\tsingers\n    \u003chttp://www.yso.fi/onto/yso/p675\u003e\t0.0679\tpets\n    \u003chttp://www.yso.fi/onto/yso/p27825\u003e\t0.0651\tjumping\n    \u003chttp://www.yso.fi/onto/yso/p25726\u003e\t0.0631\tbrown\n    \u003chttp://www.yso.fi/onto/yso/p2023\u003e\t0.0584\tanimals\n    \u003chttp://www.yso.fi/onto/yso/p4484\u003e\t0.0453\tjazz\n    \u003chttp://www.yso.fi/onto/yso/p22993\u003e\t0.0357\tclicker training\n    doc-1\n    \u003chttp://www.yso.fi/onto/yso/p1780\u003e\t0.7189\thistory\n    \u003chttp://www.yso.fi/onto/yso/p2787\u003e\t0.7167\tlibraries\n    \u003chttp://www.yso.fi/onto/yso/p11657\u003e\t0.6425\tnational libraries\n    \u003chttp://www.yso.fi/onto/yso/p94426\u003e\t0.3903\tFinland\n    \u003chttp://www.yso.fi/onto/yso/p12676\u003e\t0.3430\tcollections\n    \u003chttp://www.yso.fi/onto/yso/p8025\u003e\t0.2621\tarchitecture\n    \u003chttp://www.yso.fi/onto/yso/p4860\u003e\t0.2586\tlibrary buildings\n    \u003chttp://www.yso.fi/onto/yso/p19136\u003e\t0.2577\tscientific libraries\n    \u003chttp://www.yso.fi/onto/yso/p1778\u003e\t0.2208\thistories (literary works)\n    \u003chttp://www.yso.fi/onto/yso/p10184\u003e\t0.2120\tuniversity libraries\n    doc-2\n    \u003chttp://www.yso.fi/onto/yso/p4934\u003e\t0.5751\tmuseums\n    \u003chttp://www.yso.fi/onto/yso/p2787\u003e\t0.5510\tlibraries\n    \u003chttp://www.yso.fi/onto/yso/p2336\u003e\t0.4488\tarchives (memory organisations)\n    \u003chttp://www.yso.fi/onto/yso/p26984\u003e\t0.4123\tsubject indexing\n    \u003chttp://www.yso.fi/onto/yso/p11477\u003e\t0.2768\tautomation\n    \u003chttp://www.yso.fi/onto/yso/p13380\u003e\t0.2394\tsubject cataloging\n    \u003chttp://www.yso.fi/onto/yso/p39257\u003e\t0.1884\tindexing (information technology)\n    \u003chttp://www.yso.fi/onto/yso/p1140\u003e\t0.0799\tdata storage\n    \u003chttp://www.yso.fi/onto/yso/p5521\u003e\t0.0771\tinformation management\n    \u003chttp://www.yso.fi/onto/yso/p21192\u003e\t0.0749\tlong-term preservation\n\n## License\n\nThe code is published under the [Apache 2.0](LICENSE.txt) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Fannif-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatlibfi%2Fannif-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Fannif-client/lists"}