New 🚀Check out the new Label Studio SDK

New Release: Major Update To Our SDK

Release notes

One of the most popular features of Label Studio is our SDK because of the unparalleled flexibility and customizability it gives our users. And now we’re excited to announce the release of a new version the Label Studio SDK! This new version utilizes Fern to automate SDK generation utilizing the OpenAPI schema and represents a major overhaul of the existing SDK. It also includes a number of major improvements to make working with our SDK and API considerably easier. You can check out the docs for the new SDK here.

What’s new?

Here some of the key changes to this new SDK release:

  • Clean and modular SDK design with idiomatic method names that follows SDK design best practices, with a clean hierarchy that reflects LS data models
  • Typization and parameter validation to reduce potential for user errors
  • Automated retries for more resilient calls
  • Async client support that now allows users to evoke calls in async applications for more efficient throughput on project and task creation
  • Auto-paginated calls for retrieving projects, tasks and users to make managing pagination less painful and allow users to iterate objects with simple “for task in tasks” loops
  • New functions including cloud storage data I/O management, managing batches of annotation, connecting ML backends, and configuring webhooks
  • Enhanced test coverage and API compatibility with Label Studio versioning to introduce additional stability
  • Added converter for import/export data formats using label_studio_sdk.converter to streamline conversions between Label Studio input/output and various common ML formats
  • Greatly improved documentation

Is the new SDK backwards compatible?

We do not anticipate that these SDK changes will be breaking and we have worked to ensure backwards compatibility with previous SDK versions if you’re using from label_studio_sdk import Client or from label_studio_sdk.data_manager import Filtersfor the legacy code. However, please note that other imports for old functions must be replaced with from label_studio_sdk._legacy import Project .

Also, the _legacy library will be deprecated; deprecation period label-studio-sdk>=1,<2.

We hope you enjoy working with this new SDK and look forward to hearing your feedback in the community Discourse!

Related Content