Skip to main content

Local Export

The SDK provides functionality to export project data locally. This feature allows you to export annotations in various formats for further analysis or backup purposes. The export created will be available in the exports section of Labellerr dashboard. Here is where you can find the export in our tool.

Acceptable values:

  • statuses: File workflow statuses to include in the export
    • None, 'assigned', 'review', 'r_assigned', 'client_review', 'cr_assigned', 'accepted', 'rejected', 'client_rejected', 'skipped', 'r_skipped', 'cr_skipped', 'critical', 'r_critical', 'cr_critical'
  • export_format: Output format for the exported data
    • 'json', 'coco_json', 'csv', 'png'
  • export_layout (optional): How the export is structured. See Export Layout and Delivery Format
    • 'monolithic', 'per_file'
  • delivery_format (optional): How the export is delivered. See Export Layout and Delivery Format
    • 'data_file', 'manifest'
File Status Definitions:
  • None - Unlabeled or pre-annotated files that haven’t entered the annotation workflow yet
  • assigned - Files assigned to an annotator, annotation work is in progress
  • review - Files ready for review (passed annotation phase)
  • r_assigned - Files assigned to a reviewer, review work is in progress
  • client_review - Files that have passed internal review and are now in client review stage
  • cr_assigned - Files assigned for client review, client review work is in progress
  • accepted - Files that have completed all stages and passed by client (final approved state)
  • rejected - Files rejected by the reviewer during review stage
  • client_rejected - Files rejected by the client during client review stage
  • skipped - Files skipped by the annotator during annotation stage
  • r_skipped - Files skipped by the reviewer during review stage
  • cr_skipped - Files skipped by the client during client review stage
  • critical - Files skipped 2 times in annotation stage, will go into blocked state
  • r_critical - Files skipped 2 times in review stage, will go into blocked state
  • cr_critical - Files skipped 2 times in client review stage, will go into blocked state
Tip: You can include multiple statuses in your export to capture files at different stages of your annotation workflow.

Example Usage:

Local Export Example
Note: The export process creates a downloadable file link of your project’s annotations based on the specified status filters. This is useful for backup purposes or when you need to process the annotations offline.

Export Layout and Delivery Format

New Feature: Choose whether your export is a single combined file or one file per asset, and how it is delivered.
Two optional parameters on CreateExportParams control the shape of the export:
  • export_layout: How annotations are grouped
    • 'monolithic' - All files’ annotations in a single export file
    • 'per_file' - A separate export file for each asset (image or video)
  • delivery_format: How the export is delivered to you
    • 'data_file' - A single file (.json / .csv). Used with monolithic
    • 'manifest' - A manifest.json listing every per-file export with its download link. Used with per_file
You can also import the enums instead of passing strings:

Default Behavior

If you don’t pass export_layout and delivery_format, the defaults depend on the project’s data type: Existing code that does not pass these parameters keeps working exactly as before.

Valid Combinations

Format Rules

Some export formats only support specific project types or layouts:
csv exports are only supported for image classification projects. Using csv for video projects, or for image projects with other annotation types (bounding box, polygon, etc.), is not supported.

Example Usage - Single File Export (Image):

Monolithic Export Example

Example Usage - Video Export with Manifest:

Video Manifest Export Example

Validation Errors

Invalid combinations are rejected when the export is created, so no export is started:
  • Unknown values (for example export_layout="per_page") raise a pydantic.ValidationError in the SDK before any request is sent.
  • Combinations that break the rules above (for example png with monolithic, or monolithic with manifest) raise a LabellerrError from the API with a message describing the rule.

S3 Export

The SDK also provides functionality to export project data directly to AWS S3 buckets. This feature allows you to export annotations in various formats directly to your S3 storage for automated workflows, backup, or integration with other systems. The export created will be available in the exports section of Labellerr dashboard. Here is where you can find the export in our tool.

Prerequisites:

Before creating an S3 export, you need to:
  1. Create an AWS S3 connection using your AWS credentials
  2. Get the connection_id from the created connection

Example Usage:

S3 Export Example
Important Notes:
  • The export_folder_path should follow the pattern: bucket_name/path/to/folder/ (the trailing slash is important)
  • Make sure your AWS credentials have write permissions to the specified S3 bucket
  • You can reuse the same connection_id for multiple exports without creating a new connection each time
  • The export will be uploaded directly to your S3 bucket at the specified path

List All Exports

The SDK provides functionality to retrieve all exports associated with a project. This method returns both completed and in-progress exports, making it easy to track and manage your export history.

Example Usage:

List All Exports Example
Response Structure: The list_exports() method returns an ExportsListResponse object with two properties:
  • completed: List of all completed exports
  • in_progress: List of all exports currently being processed
Use Cases:
  • Track export history for a project
  • Find specific export IDs for status checks or downloads
  • Monitor ongoing export operations
  • Audit export activities
  • Automate export management workflows

Incremental Export with Timestamp Filtering

New Feature: Filter files based on their last updated time to create incremental exports!
You can now filter files based on their last updated timestamp when creating exports. This powerful feature enables incremental backups where only files modified after a specific time are exported, significantly reducing export size and processing time.

Key Features:

  • Timestamp Format: Unix timestamp in milliseconds
  • Filter Criteria: Files updated after the specified timestamp
  • Works with: Both local and S3 export destinations
  • Optional Parameter: When not provided, all files matching status criteria are exported

Example Usage - Incremental Local Export:

Incremental Export Example

Example Usage - Incremental S3 Export:

Incremental S3 Export Example

Practical Use Cases:

Incremental Backups

Export only files modified since your last backup, reducing storage and bandwidth

Daily/Weekly Exports

Automate exports for specific time windows (last 24 hours, last week, etc.)

Change Tracking

Monitor and export recently modified annotations for quality control

Workflow Automation

Create automated pipelines that process only recent changes
Important Notes:
  • The timestamp must be in milliseconds (multiply seconds by 1000)
  • The filter is based on the file’s “last updated time” in the system
  • Combines with status filters - only files matching both criteria are exported
  • Works seamlessly with both local and S3 export destinations
Timestamp Conversion Examples:

Check Export Status

This method allows users to check the export status of a previously triggered export task (both local and S3 exports). The status will indicate whether the export is still processing, completed, or failed. For local exports, if successful, the function also sends the downloadable file link URL with its expiration time and status. For S3 exports, it indicates when the export has been successfully uploaded to your S3 bucket.

Example Usage :

Check Export Status Example

Fetch Export Download URL

This endpoint is used to fetch the downloadable link for a previously created local export using the export’s UUID and report ID. The response includes a signed URL from which the export file can be downloaded with the time left to expire. Note: This method is only applicable for local exports. For S3 exports, the files are directly uploaded to your S3 bucket at the specified path.

Example Usage :

Fetch Download URL Example

Export Management Features Summary

List All Exports

Retrieve all completed and in-progress exports for your project

Incremental Exports

Filter files by timestamp for efficient incremental backups

Local Export

Export annotations to downloadable files

Layout & Delivery Format

Export as a single file or as per-file exports with a manifest

S3 Export

Export directly to AWS S3 buckets

Export Status

Monitor export progress with automatic download URLs

Download URLs

Fetch signed download links for completed exports

Quick Reference

Export Formats

Export Layout & Delivery Format

Export Statuses

Common Timestamp Calculations