Skip to content

PixelClient

pixel_client

PixelClient

Synchronous client for the Pixel API.

This client provides methods for working with projects, data collections, images, rasters, and other resources in the Pixel system. It handles authentication, request management, and provides high-level operations for common tasks.

Source code in src/pixel_client/_sync.py
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
class PixelClient:
    """
    Synchronous client for the Pixel API.

    This client provides methods for working with projects, data collections, images,
    rasters, and other resources in the Pixel system. It handles authentication,
    request management, and provides high-level operations for common tasks.
    """

    def __init__(self, async_client: PixelClientAsync):
        """
        Initialize the synchronous Pixel client with an asynchronous client.

        Args:
            async_client: An instance of PixelClientAsync to handle asynchronous operations.
        """
        self._async_client = async_client

    @classmethod
    def from_settings(cls, settings: PixelApiSettings, **kwargs) -> Self:
        """
        Instantiate the client from settings.

        Args:
            settings: PixelApiSettings object containing API configuration.
            **kwargs: Additional keyword arguments to pass to the client constructor.

        Returns:
            PixelClient: A new client instance configured with the provided settings.
        """
        return cls(PixelClientAsync.from_settings(settings, **kwargs))

    def __enter__(self) -> Self:
        """
        Enter the context manager, returning the client instance.

        Returns:
            PixelClient: The client instance itself.
        """
        run_sync(self._async_client.__aenter__())
        return self

    def __exit__(self, exc_type, exc_value, traceback) -> None:
        """
        Exit the context manager, cleaning up resources.

        Args:
            exc_type: The type of exception raised, if any.
            exc_value: The value of the exception raised, if any.
            traceback: The traceback object, if any.
        """
        run_sync(self._async_client.__aexit__(exc_type, exc_value, traceback))

    def me(self, extended: bool = False) -> dict:
        """
        Get information about the authenticated user.

        Args:
            extended: If True, returns extended user information including projects user is a member of

        Returns:
            dict: User information including username, email, and other profile details.
        """
        return run_sync(self._async_client.me(extended))

    def get_plugins(self) -> list[dict]:
        """
        Retrieve a list of available plugins for the pixel tenant.
        Possible plugins include:
        * 'optimized_raster' - Optimize Raster capability
        * 'image_service' - Image Service capability, dependent on the 'optimize_raster' plugin.

        Returns:
            list[dict]: A list of plugin objects with their details.
        """
        return run_sync(self._async_client.get_plugins())

    def create_project(
        self,
        name: str,
        description: str,
        area_of_interest: Polygon,
        parent_project_id: int | None = None,
        tags: list[str] | None = None,
    ) -> dict:
        """
        Create a new project in the Pixel system.

        Args:
            name: The name of the project.
            description: A description of the project.
            area_of_interest: A GeoJSON polygon defining the project's geographic area of interest.
            parent_project_id: Optional ID of a parent project. If provided, this project will be created as a child of that project.
            tags: Optional list of tags to associate with the project.

        Returns:
            dict: The created project object.
        """
        return run_sync(
            self._async_client.create_project(
                name, description, area_of_interest, parent_project_id, tags
            )
        )

    def update_project(
        self,
        project_id: int,
        name: str | None = None,
        description: str | None = None,
        area_of_interest: Polygon | None = None,
        add_tags: list[str] | None = None,
        remove_tags: list[str] | None = None,
    ) -> dict:
        """
        Update an existing project with new values.

        Args:
            project_id: The ID of the project to update.
            name: Optional new name for the project.
            description: Optional new description for the project.
            area_of_interest: Optional new GeoJSON polygon defining the project's geographic area of interest.
            add_tags: Optional list of tags to add to the project.
            remove_tags: Optional list of tags to remove from the project.

        Returns:
            dict: The updated project object.

        Raises:
            ValueError: If no update parameters are provided.
        """
        return run_sync(
            self._async_client.update_project(
                project_id, name, description, area_of_interest, add_tags, remove_tags
            )
        )

    def get_project(self, project_id: int, extended: bool = False) -> dict:
        """Retrieve a project by its ID.

        Args:
            project_id: The ID of the project to retrieve.
            extended: If True, returns extended project information including child projects and data collections.

        Returns:
            dict: The project object with its details.
        """
        return run_sync(self._async_client.get_project(project_id, extended))

    def delete_project(self, project_id: int) -> dict:
        """Delete a project by its ID.

        Args:
            project_id: The ID of the project to delete.

        Returns:
            dict: The response confirming deletion.
        """
        return run_sync(self._async_client.delete_project(project_id))

    def restore_project(self, project_id: int) -> dict:
        """Restore a deleted project by its ID.

        Args:
            project_id: The ID of the project to restore.

        Returns:
            dict: The restored project object.
        """
        return run_sync(self._async_client.restore_project(project_id))

    def list_projects(self, params: ListParams | None = None, **kwargs) -> list[dict]:
        """List projects with optional filtering.

        Args:
            params: Optional ListParams object containing filtering parameters such as offset, limit, search, etc.
            **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

        Returns:
            list[dict]: A list of project objects matching the filter criteria.
        """
        return run_sync(self._async_client.list_projects(params, **kwargs))

    def list_deleted_projects(
        self, params: ListParams | None = None, **kwargs
    ) -> list[dict]:
        """List deleted projects in the Pixel system.

        Args:
            params: Optional ListParams object containing filtering parameters such as offset, limit, search, etc.
            **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

        Returns:
            list[dict]: A list of deleted project objects.
        """
        return run_sync(self._async_client.list_deleted_projects(params, **kwargs))

    def move_project(
        self, project_id: int, new_parent_project_id: int | None = None
    ) -> dict:
        """Move a project to a new parent project or to the root level.

        Args:
            project_id: The ID of the project to move.
            new_parent_project_id: Optional ID of the new parent project. If None, the project will be moved to the root level.

        Returns:
            dict: The updated project object.
        """
        return run_sync(
            self._async_client.move_project(project_id, new_parent_project_id)
        )

    def create_data_collection(
        self,
        project_id: int,
        name: str,
        description: str,
        data_collection_type: Literal["image", "raster", "RGB", "DTM", "DSM"],
        tags: list[str] | None = None,
        raster_info: RasterInfo | None = None,
    ) -> dict:
        """
        Create a new data collection within a project.

        Args:
            project_id: The ID of the project to create the data collection in.
            name: The name of the data collection.
            description: A description of the data collection.
            data_collection_type: The type of data collection (e.g., "image", "raster", "RGB", "DTM", "DSM").
            tags: Optional list of tags to associate with the data collection.
            raster_info: Optional RasterInfo object containing raster-specific configuration.

        Returns:
            dict: The created data collection object.
        """

        return run_sync(
            self._async_client.create_data_collection(
                project_id, name, description, data_collection_type, tags, raster_info
            )
        )

    def update_data_collection(
        self,
        project_id: int,
        data_collection_id: int,
        name: str | None = None,
        description: str | None = None,
        add_tags: list[str] | None = None,
        remove_tags: list[str] | None = None,
    ) -> dict:
        """
        Update an existing data collection with new values.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection to update.
            name: Optional new name for the data collection.
            description: Optional new description for the data collection.
            add_tags: Optional list of tags to add to the data collection.
            remove_tags: Optional list of tags to remove from the data collection.

        Returns:
            dict: The updated data collection object.

        Raises:
            ValueError: If no update parameters are provided.
        """

        return run_sync(
            self._async_client.update_data_collection(
                project_id, data_collection_id, name, description, add_tags, remove_tags
            )
        )

    def get_data_collection(self, project_id: int, data_collection_id: int) -> dict:
        """
        Retrieve a data collection by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection to retrieve.

        Returns:
            dict: The data collection object with its details.
        """
        return run_sync(
            self._async_client.get_data_collection(project_id, data_collection_id)
        )

    def list_data_collections(
        self, project_id: int, params: DataCollectionListParams | None = None, **kwargs
    ) -> list[dict]:
        """
        List data collections within a project with optional filtering.

        Args:
            project_id: The ID of the project to list data collections from.
            params: Optional DataCollectionListParams object containing filtering parameters.
            **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

        Returns:
            list[dict]: A list of data collection objects matching the filter criteria.
        """
        return run_sync(
            self._async_client.list_data_collections(project_id, params, **kwargs)
        )

    def list_deleted_data_collections(
        self, project_id: int, params: DataCollectionListParams | None = None, **kwargs
    ) -> list[dict]:
        """List deleted data collections within a project.

        Args:
            project_id: The ID of the project to list deleted data collections from.

        Returns:
            list[dict]: A list of deleted data collection objects.
        """
        return run_sync(
            self._async_client.list_deleted_data_collections(
                project_id, params, **kwargs
            )
        )

    def delete_data_collection(self, project_id: int, data_collection_id: int) -> dict:
        """
        Delete a data collection by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection to delete.

        Returns:
            dict: The response confirming deletion.
        """
        return run_sync(
            self._async_client.delete_data_collection(project_id, data_collection_id)
        )

    def restore_data_collection(self, project_id: int, data_collection_id: int) -> dict:
        """Restore a deleted data collection by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection to restore.

        Returns:
            dict: The restored data collection object.
        """
        return run_sync(
            self._async_client.restore_data_collection(project_id, data_collection_id)
        )

    def move_data_collection(
        self, project_id: int, data_collection_id: int, new_project_id: int
    ) -> dict:
        """
        Move a data collection to a different project.

        Args:
            project_id: The ID of the project currently containing the data collection.
            data_collection_id: The ID of the data collection to move.
            new_project_id: The ID of the project to move the data collection to.

        Returns:
            dict: The updated data collection object.
        """
        return run_sync(
            self._async_client.move_data_collection(
                project_id, data_collection_id, new_project_id
            )
        )

    def get_images(
        self,
        project_id: int,
        data_collection_id: int,
        params: ListParams | None = None,
        **kwargs,
    ) -> dict:
        """
        Retrieve images from a data collection with optional filtering.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the images.
            params: Optional ListParams object containing filtering parameters.
            **kwargs: Alternative way to provide filtering parameters.

        Returns:
            dict: A list of image objects matching the filter criteria.
        """
        return run_sync(
            self._async_client.get_images(
                project_id, data_collection_id, params, **kwargs
            )
        )

    def paginate_images(
        self,
        project_id: int,
        data_collection_id: int,
        page_size: int,
        params: ListParams | None = None,
        **kwargs,
    ) -> Iterator[dict]:
        """
        Paginate through images in a data collection with optional filtering.

        This method returns an async generator that yields images one at a time,
        automatically handling pagination in the background.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the images.
            page_size: The number of images to fetch per page.
            params: Optional ListParams object containing filtering parameters (excluding offset and limit).
            **kwargs: Alternative way to provide filtering parameters.

        Yields:
            dict: Image objects matching the filter criteria, one at a time.
        """
        return iter_over_async(
            self._async_client.paginate_images(
                project_id,
                data_collection_id,
                page_size,
                params,
                **kwargs,
            )
        )

    def get_image(
        self, project_id: int, data_collection_id: int, image_id: int
    ) -> dict:
        """
        Retrieve a specific image by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the image.
            image_id: The ID of the image to retrieve.

        Returns:
            dict: The image object with its details.
        """
        return run_sync(
            self._async_client.get_image(project_id, data_collection_id, image_id)
        )

    def get_image_metadata(
        self, project_id: int, data_collection_id: int, image_id: int
    ) -> dict:
        """
        Retrieve metadata for a specific image by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the image.
            image_id: The ID of the image to retrieve metadata for.

        Returns:
            dict: The image metadata object with its details.
        """
        return run_sync(
            self._async_client.get_image_metadata(
                project_id, data_collection_id, image_id
            )
        )

    def update_image(
        self,
        project_id: int,
        data_collection_id: int,
        image_id: int,
        update_input: ImageUpdateInput,
    ) -> dict:
        """
        Update an existing image with new values.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the image.
            image_id: The ID of the image to update.
            update_input: ImageUpdateInput object containing the fields to update.

        Returns:
            dict: The updated image object.
        """
        return run_sync(
            self._async_client.update_image(
                project_id, data_collection_id, image_id, update_input
            )
        )

    def delete_image(
        self, project_id: int, data_collection_id: int, image_id: int
    ) -> dict:
        """
        Delete a specific image by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the image.
            image_id: The ID of the image to delete.

        Returns:
            dict: The response confirming deletion.
        """
        return run_sync(
            self._async_client.delete_image(project_id, data_collection_id, image_id)
        )

    def get_rasters(
        self,
        project_id: int,
        data_collection_id: int,
        params: ListParams | None = None,
        **kwargs,
    ) -> dict:
        """
        Retrieve rasters from a data collection with optional filtering.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the rasters.
            params: Optional ListParams object containing filtering parameters.
            **kwargs: Alternative way to provide filtering parameters.

        Returns:
            dict: A list of raster objects matching the filter criteria.
        """
        return run_sync(
            self._async_client.get_rasters(
                project_id, data_collection_id, params, **kwargs
            )
        )

    def paginate_rasters(
        self,
        project_id: int,
        data_collection_id: int,
        page_size: int,
        params: ListParams | None = None,
        **kwargs,
    ) -> Iterator[dict]:
        """
        Paginate through rasters in a data collection with optional filtering.

        This method returns an async generator that yields rasters one at a time,
        automatically handling pagination in the background.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the rasters.
            page_size: The number of rasters to fetch per page.
            params: Optional ListParams object containing filtering parameters (excluding offset and limit).
            **kwargs: Alternative way to provide filtering parameters.

        Yields:
            dict: Raster objects matching the filter criteria, one at a time.
        """
        return iter_over_async(
            self._async_client.paginate_rasters(
                project_id,
                data_collection_id=data_collection_id,
                page_size=page_size,
                params=params,
                **kwargs,
            )
        )

    def get_raster(
        self, project_id: int, data_collection_id: int, raster_id: int
    ) -> dict:
        """
        Retrieve a specific raster by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the raster.
            raster_id: The ID of the raster to retrieve.

        Returns:
            dict: The raster object with its details.
        """
        return run_sync(
            self._async_client.get_raster(project_id, data_collection_id, raster_id)
        )

    def update_raster(
        self,
        project_id: int,
        data_collection_id: int,
        raster_id: int,
        update_input: RasterUpdateInput,
    ) -> dict:
        """
        Update an existing raster with new values.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the raster.
            raster_id: The ID of the raster to update.
            update_input: RasterUpdateInput object containing the fields to update.

        Returns:
            dict: The updated raster object.
        """
        return run_sync(
            self._async_client.update_raster(
                project_id, data_collection_id, raster_id, update_input
            )
        )

    def delete_raster(
        self, project_id: int, data_collection_id: int, raster_id: int
    ) -> dict:
        """
        Delete a specific raster by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the raster.
            raster_id: The ID of the raster to delete.

        Returns:
            dict: The response confirming deletion.
        """

        return run_sync(
            self._async_client.delete_raster(project_id, data_collection_id, raster_id)
        )

    def get_upload_jobs(
        self,
        project_id: int,
        data_collection_id: int,
        params: ListParams | None = None,
        **kwargs,
    ) -> list[dict]:
        """
        Retrieve upload jobs for a data collection with optional filtering.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection to list upload jobs for.
            params: Optional ListParams object containing filtering parameters.
            **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

        Returns:
            list[dict]: A list of upload job objects matching the filter criteria.
        """
        return run_sync(
            self._async_client.get_upload_jobs(
                project_id, data_collection_id, params, **kwargs
            )
        )

    def upload_image(
        self,
        project_id: int,
        data_collection_id: int,
        file_path: Path,
        metadata: dict | None = None,
        support_files: list[Path] | None = None,
        multipart: bool = False,
        multipart_part_size: int | None = None,
    ) -> dict:
        """
        Upload an image file to an image data collection.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the image data collection to upload to.
            file_path: Path to the image file to upload.
            metadata: Optional dictionary of metadata to associate with the image.
            support_files: Optional list of support file paths to upload with the image.
            multipart: If True, use multipart upload for large files.
            multipart_part_size: Required size of each part in bytes when using multipart upload.

        Returns:
            dict: The created image object.

        Raises:
            ValueError: If the data collection is not an image data collection.
            FileNotFoundError: If the file does not exist.
            ValueError: If multipart is True but multipart_part_size is not provided.
        """
        return run_sync(
            self._async_client.upload_image(
                project_id,
                data_collection_id,
                file_path,
                metadata,
                support_files,
                multipart,
                multipart_part_size,
            )
        )

    def upload_multiple_images(
        self,
        project_id: int,
        data_collection_id: int,
        files: list[PixelUploadFile],
        multipart: bool = False,
        multipart_part_size: int | None = None,
    ) -> tuple[list[dict], list[PixelUploadJobError]]:
        """
        Upload multiple image files to an image data collection.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the image data collection to upload to.
            files: List of PixelUploadFile objects containing the files to upload.
            multipart: If True, use multipart upload for large files.
            multipart_part_size: Required size of each part in bytes when using multipart upload.

        Returns:
            tuple: A tuple containing:
                - list[dict]: List of created image objects.
                - list[PixelUploadJobError]: List of errors that occurred during upload.

        Raises:
            ValueError: If the data collection is not an image data collection.
            ValueError: If any files have duplicate names.
            ValueError: If multipart is True but multipart_part_size is not provided.
        """
        return run_sync(
            self._async_client.upload_multiple_images(
                project_id, data_collection_id, files, multipart, multipart_part_size
            )
        )

    def upload_raster(
        self,
        project_id: int,
        data_collection_id: int,
        file_path: Path,
        support_files: list[Path] | None = None,
        multipart: bool = False,
        multipart_part_size: int | None = None,
    ) -> dict:
        """
        Upload a raster file to a raster data collection.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the raster data collection to upload to.
            file_path: Path to the raster file to upload.
            support_files: Optional list of support file paths to upload with the raster.
            multipart: If True, use multipart upload for large files.
            multipart_part_size: Required size of each part in bytes when using multipart upload.

        Returns:
            dict: The created raster object.

        Raises:
            ValueError: If the data collection is not a raster data collection.
            FileNotFoundError: If the file does not exist.
            ValueError: If multipart is True but multipart_part_size is not provided.
        """
        return run_sync(
            self._async_client.upload_raster(
                project_id,
                data_collection_id,
                file_path,
                support_files,
                multipart,
                multipart_part_size,
            )
        )

    def upload_multiple_rasters(
        self,
        project_id: int,
        data_collection_id: int,
        files: list[PixelUploadFile],
        multipart: bool = False,
        multipart_part_size: int | None = None,
    ) -> tuple[list[dict], list[PixelUploadJobError]]:
        """
        Upload multiple raster files to a raster data collection.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the raster data collection to upload to.
            files: List of PixelUploadFile objects containing the files to upload.
            multipart: If True, use multipart upload for large files.
            multipart_part_size: Required size of each part in bytes when using multipart upload.

        Returns:
            tuple: A tuple containing:
                - list[dict]: List of created raster objects.
                - list[PixelUploadJobError]: List of errors that occurred during upload.

        Raises:
            ValueError: If the data collection is not a raster data collection.
            ValueError: If any files have duplicate names.
            ValueError: If multipart is True but multipart_part_size is not provided.
        """
        return run_sync(
            self._async_client.upload_multiple_rasters(
                project_id, data_collection_id, files, multipart, multipart_part_size
            )
        )

    def create_optimized_rasters(
        self,
        project_id: int,
        data_collection_id: int,
        raster_ids: list[int] | None,
        profile: str | None = None,
        nearblack: NearblackOptions | None = None,
        overview_resampling: OverviewResampling = "average",
    ) -> list[dict]:
        """
        Create optimized raster objects in the database.

        This function creates optimized raster objects but does not run the actual optimization process.
        To run the optimization, use the run_optimize_rasters function with the returned optimized raster IDs.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the rasters.
            raster_ids: Optional list of raster IDs to optimize. If None, all rasters in the collection will be optimized.
            profile: Optional profile name to use for optimization.
            nearblack: Optional NearblackOptions object for configuring the nearblack process.
            overview_resampling: The resampling method to use for creating overviews. Default is "average".

        Returns:
            list[dict]: List of created optimized raster objects.
        """
        return run_sync(
            self._async_client.create_optimized_rasters(
                project_id,
                data_collection_id,
                raster_ids,
                profile,
                nearblack,
                overview_resampling,
            )
        )

    def get_optimized_rasters(
        self, project_id: int, data_collection_id: int, params: ListParams, **kwargs
    ) -> list[dict]:
        """
        Retrieve optimized rasters from a data collection with optional filtering.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the optimized rasters.
            params: Optional ListParams object containing filtering parameters.
            **kwargs: Alternative way to provide filtering parameters.

        Returns:
            list[dict]: A list of optimized raster objects matching the filter criteria.
        """
        return run_sync(
            self._async_client.get_optimized_rasters(
                project_id, data_collection_id, params, **kwargs
            )
        )

    def delete_optimized_rasters(
        self,
        project_id: int,
        data_collection_id: int,
        raster_id: int,
        profile: str | None = None,
    ) -> list[dict]:
        """
        Delete optimized rasters associated with a specific raster.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the raster.
            raster_id: The ID of the raster whose optimized versions should be deleted.
            profile: Optional profile name to filter which optimized rasters to delete.
                    If None, all optimized versions of the raster will be deleted.

        Returns:
            list[dict]: A list of the deleted optimized raster objects.
        """
        return run_sync(
            self._async_client.delete_optimized_rasters(
                project_id, data_collection_id, raster_id, profile
            )
        )

    def optimize_rasters(
        self,
        project_id: int,
        data_collection_id: int,
        raster_ids: list[int] | None = None,
        profile: str | None = None,
        nearblack: NearblackOptions | None = None,
        overview_resampling: OverviewResampling = "average",
    ) -> list[dict]:
        """
        Create and run optimization on rasters in a data collection.

        This is a convenience method that combines create_optimized_rasters and run_optimize_rasters
        into a single operation.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the rasters.
            raster_ids: Optional list of raster IDs to optimize. If None, all rasters in the collection will be optimized.
            profile: Optional profile name to use for optimization.
            nearblack: Optional NearblackOptions object for configuring the nearblack process.
            overview_resampling: The resampling method to use for creating overviews. Default is "average".

        Returns:
            list[dict]: List of optimized raster objects after the optimization process has completed.
        """
        return run_sync(
            self._async_client.optimize_rasters(
                project_id,
                data_collection_id,
                raster_ids,
                profile,
                nearblack,
                overview_resampling,
            )
        )

    def run_optimize_rasters(
        self,
        project_id: int,
        data_collection_id: int,
        optimize_raster_ids: list[int] | None,
        retry_failed: bool = False,
    ) -> dict:
        """
        Run the optimization process on optimized raster objects.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the optimized rasters.
            optimize_raster_ids: Optional list of optimized raster IDs to process. If None, all optimized rasters in the collection will be processed.
            retry_failed: If True, retry previously failed optimization jobs.

        Returns:
            dict: The group job object representing the optimization process.
        """
        return run_sync(
            self._async_client.run_optimize_rasters(
                project_id, data_collection_id, optimize_raster_ids, retry_failed
            )
        )

    def get_job(self, job_id: int) -> dict:
        """
        Retrieve information about a specific job.

        Args:
            job_id: The ID of the job to retrieve.

        Returns:
            dict: The job object with its details.
        """
        return run_sync(self._async_client.get_job(job_id))

    def get_job_group(self, job_id: int) -> dict:
        """
        Retrieve information about a specific job group.

        Args:
            job_id: The ID of the job group to retrieve.

        Returns:
            dict: The job group object with its details.
        """
        return run_sync(self._async_client.get_job_group(job_id))

    def wait_for_job(self, job_id: int, timeout: int = 600) -> dict:
        """
        Wait for a job to complete, polling its status at regular intervals.

        Args:
            job_id: The ID of the job to wait for.
            timeout: Maximum time to wait in seconds before raising a TimeoutError. Default is 600 seconds (10 minutes).

        Returns:
            dict: The completed job object.

        Raises:
            TimeoutError: If the job does not complete within the specified timeout period.
        """
        return run_sync(self._async_client.wait_for_job(job_id, timeout))

    def wait_for_group_job(self, group_job_id: int, timeout: int = 1200) -> dict:
        """
        Wait for a group job to complete, polling its status at regular intervals.

        A group job consists of multiple individual jobs. This method displays a progress bar
        showing the completion status of all jobs in the group.

        Args:
            group_job_id: The ID of the group job to wait for.
            timeout: Maximum time to wait in seconds before raising a TimeoutError. Default is 1200 seconds (20 minutes).

        Returns:
            dict: The completed group job object.

        Raises:
            TimeoutError: If the group job does not complete within the specified timeout period.
        """
        return run_sync(self._async_client.wait_for_group_job(group_job_id, timeout))

    def list_gdo_users(self) -> list[str]:
        """
        Retrieve a list of GDO (GeoData Online) users.

        Returns:
            list[dict]: A list of GDO user names.
        """
        return run_sync(self._async_client.list_gdo_users())

    def create_arcgis_service(
        self,
        service_type: Literal["Feature", "Image"],
        create_input: ArcgisServiceCreateInput,
    ) -> dict:
        """
        Create a new ArcGIS service.

        Args:
            service_type: The type of service to create, either "Feature" or "Image".
            create_input: ArcgisServiceCreateInput object containing the service configuration.

        Returns:
            dict: The created ArcGIS service object.

        Raises:
            AssertionError: If the create_input does not contain the appropriate service options for the specified service_type.
        """
        return run_sync(
            self._async_client.create_arcgis_service(service_type, create_input)
        )

    def list_arcgis_services(
        self,
        service_type: Literal["Feature", "Image"],
        params: ListParams | None = None,
        **kwargs,
    ) -> list[dict]:
        """
        List ArcGIS services of a specific type with optional filtering.

        Args:
            service_type: The type of services to list, either "Feature" or "Image".
            params: Optional ListParams object containing filtering parameters.
            **kwargs: Alternative way to provide filtering parameters.

        Returns:
            list[dict]: A list of ArcGIS service objects matching the filter criteria.
        """
        return run_sync(
            self._async_client.list_arcgis_services(service_type, params, **kwargs)
        )

    def get_arcgis_service(
        self, service_type: Literal["Feature", "Image"], service_id: int
    ) -> dict:
        """
        Retrieve a specific ArcGIS service by its ID.

        Args:
            service_type: The type of service, either "Feature" or "Image".
            service_id: The ID of the service to retrieve.

        Returns:
            dict: The ArcGIS service object with its details.
        """
        return run_sync(self._async_client.get_arcgis_service(service_type, service_id))

    def delete_arcgis_service(
        self, service_type: Literal["Feature", "Image"], service_id: int
    ) -> dict:
        """
        Delete a specific ArcGIS service by its ID.

        Args:
            service_type: The type of service, either "Feature" or "Image".
            service_id: The ID of the service to delete.

        Returns:
            dict: The response confirming deletion.
        """
        return run_sync(
            self._async_client.delete_arcgis_service(service_type, service_id)
        )

    def update_arcgis_service(
        self,
        service_type: Literal["Feature", "Image"],
        service_id: int,
        update_input: ArcgisServiceUpdateInput,
    ) -> dict:
        """
        Update an existing ArcGIS service with new values.

        Args:
            service_type: The type of service, either "Feature" or "Image".
            service_id: The ID of the service to update.
            update_input: ArcgisServiceUpdateInput object containing the fields to update.

        Returns:
            dict: The updated ArcGIS service object.
        """
        return run_sync(
            self._async_client.update_arcgis_service(
                service_type, service_id, update_input
            )
        )

    def start_arcgis_service(
        self,
        service_type: Literal["Feature", "Image"],
        service_id: int,
        wait: bool = True,
    ) -> dict:
        """
        Start a specific ArcGIS service.

        Args:
            service_type: The type of service, either "Feature" or "Image".
            service_id: The ID of the service to start.
            wait: If True, wait for the start operation to complete before returning.
                 If False, return immediately after initiating the start operation.

        Returns:
            dict: A response object containing job information and, if wait is True,
                 the updated service object after starting.
        """
        return run_sync(
            self._async_client.start_arcgis_service(service_type, service_id, wait)
        )

    def stop_arcgis_service(
        self,
        service_type: Literal["Feature", "Image"],
        service_id: int,
        wait: bool = True,
    ) -> dict:
        """
        Stop a specific ArcGIS service.

        Args:
            service_type: The type of service, either "Feature" or "Image".
            service_id: The ID of the service to stop.
            wait: If True, wait for the stop operation to complete before returning.
                 If False, return immediately after initiating the stop operation.

        Returns:
            dict: A response object containing job information and, if wait is True,
                 the updated service object after stopping.
        """
        return run_sync(
            self._async_client.stop_arcgis_service(service_type, service_id, wait)
        )

    def refresh_arcgis_service(
        self,
        service_type: Literal["Feature", "Image"],
        service_id: int,
        refresh_data: bool = False,
        wait: bool = True,
    ) -> dict:
        """
        Refresh a specific ArcGIS service, optionally refreshing its data.

        Args:
            service_type: The type of service, either "Feature" or "Image".
            service_id: The ID of the service to refresh.
            refresh_data: If True, also refresh the data used by the service.
            wait: If True, wait for the refresh operation to complete before returning.
                 If False, return immediately after initiating the refresh operation.

        Returns:
            dict: A response object containing job information and, if wait is True,
                 the updated service object after refreshing.
        """
        return run_sync(
            self._async_client.refresh_arcgis_service(
                service_type, service_id, refresh_data, wait
            )
        )

    def create_harvest_service(
        self,
        project_id: int,
        data_collection_id: int,
        create_input: HarvestServiceCreateInput,
    ) -> dict:
        """
        Create a new harvest service for a data collection.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection to create the harvest service for.
            create_input: HarvestServiceCreateInput object containing the service configuration.

        Returns:
            dict: The created harvest service object.
        """

        return run_sync(
            self._async_client.create_harvest_service(
                project_id, data_collection_id, create_input
            )
        )

    def list_harvest_services(
        self,
        project_id: int,
        data_collection_id: int,
        params: ListParams | None = None,
        **kwargs,
    ) -> list[dict]:
        """
        List harvest services for a data collection with optional filtering.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection to list harvest services for.
            params: Optional ListParams object containing filtering parameters.
            **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

        Returns:
            list[dict]: A list of harvest service objects matching the filter criteria.
        """

        return run_sync(
            self._async_client.list_harvest_services(
                project_id, data_collection_id, params, **kwargs
            )
        )

    def get_harvest_service(
        self, project_id: int, data_collection_id: int, service_id: int
    ) -> dict:
        """
        Retrieve a specific harvest service by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the harvest service.
            service_id: The ID of the harvest service to retrieve.

        Returns:
            dict: The harvest service object with its details.
        """

        return run_sync(
            self._async_client.get_harvest_service(
                project_id, data_collection_id, service_id
            )
        )

    def update_harvest_service(
        self,
        project_id: int,
        data_collection_id: int,
        service_id: int,
        update_input: HarvestServiceUpdateInput,
    ) -> dict:
        """
        Update an existing harvest service with new values.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the harvest service.
            service_id: The ID of the harvest service to update.
            update_input: HarvestServiceUpdateInput object containing the fields to update.

        Returns:
            dict: The updated harvest service object.
        """

        return run_sync(
            self._async_client.update_harvest_service(
                project_id, data_collection_id, service_id, update_input
            )
        )

    def delete_harvest_service(
        self, project_id: int, data_collection_id: int, service_id: int
    ) -> dict:
        """
        Delete a specific harvest service by its ID.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the harvest service.
            service_id: The ID of the harvest service to delete.

        Returns:
            dict: The response confirming deletion.
        """
        return run_sync(
            self._async_client.delete_harvest_service(
                project_id, data_collection_id, service_id
            )
        )

    def get_harvest_service_tasks(
        self,
        project_id: int,
        data_collection_id: int,
        service_id: int,
        params: HarvestTaskListParams,
        **kwargs,
    ) -> list[dict]:
        """
        Retrieve tasks for a specific harvest service with optional filtering.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the harvest service.
            service_id: The ID of the harvest service to retrieve tasks for.
            params: HarvestTaskListParams object containing filtering parameters.
            **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

        Returns:
            list[dict]: A list of harvest task objects matching the filter criteria.
        """

        return run_sync(
            self._async_client.get_harvest_service_tasks(
                project_id, data_collection_id, service_id, params, **kwargs
            )
        )

    def start_harvest_service(
        self, project_id: int, data_collection_id: int, service_id: int
    ) -> dict:
        """
        Start a specific harvest service.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the harvest service.
            service_id: The ID of the harvest service to start.

        Returns:
            dict: The response confirming the service has been started.
        """

        return run_sync(
            self._async_client.start_harvest_service(
                project_id, data_collection_id, service_id
            )
        )

    def stop_harvest_service(
        self, project_id: int, data_collection_id: int, service_id: int
    ) -> dict:
        """
        Stop a specific harvest service.

        Args:
            project_id: The ID of the project containing the data collection.
            data_collection_id: The ID of the data collection containing the harvest service.
            service_id: The ID of the harvest service to stop.

        Returns:
            dict: The response confirming the service has been stopped.
        """

        return run_sync(
            self._async_client.stop_harvest_service(
                project_id, data_collection_id, service_id
            )
        )

    def create_oidc_user(self, create_input: OIDCUserCreateInput) -> dict:
        """
        Create a new OIDC user in the system.

        Args:
            create_input: OIDCUserCreateInput object containing the user information.

        Returns:
            dict: The created user object.

        Note:
            This method handles the extraction of the password from the SecretStr field
            in the create_input object.
        """

        return run_sync(self._async_client.create_oidc_user(create_input))

    def update_oidc_user(self, user_id: int, update_input: OIDCUserUpdateInput) -> dict:
        """
        Update an existing OIDC user with new values.

        Args:
            user_id: The ID of the user to update.
            update_input: OIDCUserUpdateInput object containing the fields to update.

        Returns:
            dict: The updated user object.

        Note:
            This method handles the extraction of the password from the SecretStr field
            in the update_input object if provided.
        """

        return run_sync(self._async_client.update_oidc_user(user_id, update_input))

    def list_attachments(
        self,
        resource_type: AttachmentResourceType,
        resource_id: int,
        status: Literal["Pending", "Completed"] | None = None,
    ) -> list[dict]:
        """
        List attachments for a specific resource with optional status filtering.

        Args:
            resource_type: The type of resource the attachments belong to.
            resource_id: The ID of the resource to list attachments for.
            status: Optional filter for attachment status, either "Pending" or "Completed".

        Returns:
            list[dict]: A list of attachment objects matching the filter criteria.
        """

        return run_sync(
            self._async_client.list_attachments(resource_type, resource_id, status)
        )

    def add_attachments(
        self,
        resource_type: AttachmentResourceType,
        resource_id: int,
        files: list[PixelAttachmentUpload | Path]
        | list[Path]
        | list[PixelAttachmentUpload],
    ) -> list[dict]:
        """
        Add one or more file attachments to a resource.

        Args:
            resource_type: The type of resource to attach files to.
            resource_id: The ID of the resource to attach files to.
            files: List of files to attach, which can be Path objects or PixelAttachmentUpload objects.

        Returns:
            list[dict]: A list of the created attachment objects.

        Raises:
            AssertionError: If any attachment names are not unique.
        """

        return run_sync(
            self._async_client.add_attachments(resource_type, resource_id, files)
        )

    def move_attachment(
        self,
        resource_type: AttachmentResourceType,
        resource_id: int,
        attachment_id: int,
        new_resource_type: AttachmentResourceType,
        new_resource_id: int,
    ) -> dict:
        """
        Move an attachment from one resource to another.

        Args:
            resource_type: The current resource type of the attachment.
            resource_id: The current resource ID the attachment belongs to.
            attachment_id: The ID of the attachment to move.
            new_resource_type: The target resource type to move the attachment to.
            new_resource_id: The target resource ID to move the attachment to.

        Returns:
            dict: The updated attachment object.
        """

        return run_sync(
            self._async_client.move_attachment(
                resource_type,
                resource_id,
                attachment_id,
                new_resource_type,
                new_resource_id,
            )
        )

    def delete_attachment(
        self,
        resource_type: AttachmentResourceType,
        resource_id: int,
        attachment_id: int,
    ) -> dict:
        """
        Delete a specific attachment from a resource.

        Args:
            resource_type: The resource type the attachment belongs to.
            resource_id: The resource ID the attachment belongs to.
            attachment_id: The ID of the attachment to delete.

        Returns:
            dict: The response confirming deletion.
        """

        return run_sync(
            self._async_client.delete_attachment(
                resource_type, resource_id, attachment_id
            )
        )

    def search_info(self, on: SearchOn) -> dict:
        """
        Retrieve search metadata for a specific resource type.

        Args:
            on: The resource type to retrieve search metadata for.
        Returns:
            dict: A dictionary containing output fields, filterable fields and search capabilities.
        """
        return run_sync(self._async_client.search_info(on))

    def search(self, search_query: dict | SearchQuery) -> SearchResults:
        """
        Perform a search across various resources.

        Args:
            search_query: SearchQuery object or dict containing the search parameters.
        Returns:
            SearchResults: The search results dictionary.
        """
        return run_sync(self._async_client.search(search_query))

    def paginate_search(
        self, search_query: dict | SearchQuery, page_size: int
    ) -> Iterator[dict]:
        """
        Perform a paginated search across various resources.

        Args:
            search_query: SearchQuery object or dict containing the search parameters.
            page_size: Number of results to retrieve per page.

        Yields:
            dict: Individual search result items.
        """
        return iter_over_async(
            self._async_client.paginate_search(
                search_query,
                page_size,
            )
        )

__init__

__init__(async_client: PixelClientAsync)

Parameters:

Name Type Description Default
async_client PixelClientAsync

An instance of PixelClientAsync to handle asynchronous operations.

required
Source code in src/pixel_client/_sync.py
43
44
45
46
47
48
49
50
def __init__(self, async_client: PixelClientAsync):
    """
    Initialize the synchronous Pixel client with an asynchronous client.

    Args:
        async_client: An instance of PixelClientAsync to handle asynchronous operations.
    """
    self._async_client = async_client

from_settings classmethod

from_settings(settings: PixelApiSettings, **kwargs) -> Self

Instantiate the client from settings.

Parameters:

Name Type Description Default
settings PixelApiSettings

PixelApiSettings object containing API configuration.

required
**kwargs

Additional keyword arguments to pass to the client constructor.

{}

Returns:

Name Type Description
PixelClient Self

A new client instance configured with the provided settings.

Source code in src/pixel_client/_sync.py
52
53
54
55
56
57
58
59
60
61
62
63
64
@classmethod
def from_settings(cls, settings: PixelApiSettings, **kwargs) -> Self:
    """
    Instantiate the client from settings.

    Args:
        settings: PixelApiSettings object containing API configuration.
        **kwargs: Additional keyword arguments to pass to the client constructor.

    Returns:
        PixelClient: A new client instance configured with the provided settings.
    """
    return cls(PixelClientAsync.from_settings(settings, **kwargs))

me

me(extended: bool = False) -> dict

Get information about the authenticated user.

Parameters:

Name Type Description Default
extended bool

If True, returns extended user information including projects user is a member of

False

Returns:

Name Type Description
dict dict

User information including username, email, and other profile details.

Source code in src/pixel_client/_sync.py
87
88
89
90
91
92
93
94
95
96
97
def me(self, extended: bool = False) -> dict:
    """
    Get information about the authenticated user.

    Args:
        extended: If True, returns extended user information including projects user is a member of

    Returns:
        dict: User information including username, email, and other profile details.
    """
    return run_sync(self._async_client.me(extended))

get_plugins

get_plugins() -> list[dict]

Retrieve a list of available plugins for the pixel tenant. Possible plugins include: * 'optimized_raster' - Optimize Raster capability * 'image_service' - Image Service capability, dependent on the 'optimize_raster' plugin.

Returns:

Type Description
list[dict]

list[dict]: A list of plugin objects with their details.

Source code in src/pixel_client/_sync.py
 99
100
101
102
103
104
105
106
107
108
109
def get_plugins(self) -> list[dict]:
    """
    Retrieve a list of available plugins for the pixel tenant.
    Possible plugins include:
    * 'optimized_raster' - Optimize Raster capability
    * 'image_service' - Image Service capability, dependent on the 'optimize_raster' plugin.

    Returns:
        list[dict]: A list of plugin objects with their details.
    """
    return run_sync(self._async_client.get_plugins())

create_project

create_project(
    name: str,
    description: str,
    area_of_interest: Polygon,
    parent_project_id: int | None = None,
    tags: list[str] | None = None,
) -> dict

Create a new project in the Pixel system.

Parameters:

Name Type Description Default
name str

The name of the project.

required
description str

A description of the project.

required
area_of_interest Polygon

A GeoJSON polygon defining the project's geographic area of interest.

required
parent_project_id int | None

Optional ID of a parent project. If provided, this project will be created as a child of that project.

None
tags list[str] | None

Optional list of tags to associate with the project.

None

Returns:

Name Type Description
dict dict

The created project object.

Source code in src/pixel_client/_sync.py
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
def create_project(
    self,
    name: str,
    description: str,
    area_of_interest: Polygon,
    parent_project_id: int | None = None,
    tags: list[str] | None = None,
) -> dict:
    """
    Create a new project in the Pixel system.

    Args:
        name: The name of the project.
        description: A description of the project.
        area_of_interest: A GeoJSON polygon defining the project's geographic area of interest.
        parent_project_id: Optional ID of a parent project. If provided, this project will be created as a child of that project.
        tags: Optional list of tags to associate with the project.

    Returns:
        dict: The created project object.
    """
    return run_sync(
        self._async_client.create_project(
            name, description, area_of_interest, parent_project_id, tags
        )
    )

update_project

update_project(
    project_id: int,
    name: str | None = None,
    description: str | None = None,
    area_of_interest: Polygon | None = None,
    add_tags: list[str] | None = None,
    remove_tags: list[str] | None = None,
) -> dict

Update an existing project with new values.

Parameters:

Name Type Description Default
project_id int

The ID of the project to update.

required
name str | None

Optional new name for the project.

None
description str | None

Optional new description for the project.

None
area_of_interest Polygon | None

Optional new GeoJSON polygon defining the project's geographic area of interest.

None
add_tags list[str] | None

Optional list of tags to add to the project.

None
remove_tags list[str] | None

Optional list of tags to remove from the project.

None

Returns:

Name Type Description
dict dict

The updated project object.

Raises:

Type Description
ValueError

If no update parameters are provided.

Source code in src/pixel_client/_sync.py
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
def update_project(
    self,
    project_id: int,
    name: str | None = None,
    description: str | None = None,
    area_of_interest: Polygon | None = None,
    add_tags: list[str] | None = None,
    remove_tags: list[str] | None = None,
) -> dict:
    """
    Update an existing project with new values.

    Args:
        project_id: The ID of the project to update.
        name: Optional new name for the project.
        description: Optional new description for the project.
        area_of_interest: Optional new GeoJSON polygon defining the project's geographic area of interest.
        add_tags: Optional list of tags to add to the project.
        remove_tags: Optional list of tags to remove from the project.

    Returns:
        dict: The updated project object.

    Raises:
        ValueError: If no update parameters are provided.
    """
    return run_sync(
        self._async_client.update_project(
            project_id, name, description, area_of_interest, add_tags, remove_tags
        )
    )

get_project

get_project(
    project_id: int, extended: bool = False
) -> dict

Retrieve a project by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project to retrieve.

required
extended bool

If True, returns extended project information including child projects and data collections.

False

Returns:

Name Type Description
dict dict

The project object with its details.

Source code in src/pixel_client/_sync.py
170
171
172
173
174
175
176
177
178
179
180
def get_project(self, project_id: int, extended: bool = False) -> dict:
    """Retrieve a project by its ID.

    Args:
        project_id: The ID of the project to retrieve.
        extended: If True, returns extended project information including child projects and data collections.

    Returns:
        dict: The project object with its details.
    """
    return run_sync(self._async_client.get_project(project_id, extended))

delete_project

delete_project(project_id: int) -> dict

Delete a project by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project to delete.

required

Returns:

Name Type Description
dict dict

The response confirming deletion.

Source code in src/pixel_client/_sync.py
182
183
184
185
186
187
188
189
190
191
def delete_project(self, project_id: int) -> dict:
    """Delete a project by its ID.

    Args:
        project_id: The ID of the project to delete.

    Returns:
        dict: The response confirming deletion.
    """
    return run_sync(self._async_client.delete_project(project_id))

restore_project

restore_project(project_id: int) -> dict

Restore a deleted project by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project to restore.

required

Returns:

Name Type Description
dict dict

The restored project object.

Source code in src/pixel_client/_sync.py
193
194
195
196
197
198
199
200
201
202
def restore_project(self, project_id: int) -> dict:
    """Restore a deleted project by its ID.

    Args:
        project_id: The ID of the project to restore.

    Returns:
        dict: The restored project object.
    """
    return run_sync(self._async_client.restore_project(project_id))

list_projects

list_projects(
    params: ListParams | None = None, **kwargs
) -> list[dict]

List projects with optional filtering.

Parameters:

Name Type Description Default
params ListParams | None

Optional ListParams object containing filtering parameters such as offset, limit, search, etc.

None
**kwargs

Alternative way to provide filtering parameters. Ignored if params is provided.

{}

Returns:

Type Description
list[dict]

list[dict]: A list of project objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
204
205
206
207
208
209
210
211
212
213
214
def list_projects(self, params: ListParams | None = None, **kwargs) -> list[dict]:
    """List projects with optional filtering.

    Args:
        params: Optional ListParams object containing filtering parameters such as offset, limit, search, etc.
        **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

    Returns:
        list[dict]: A list of project objects matching the filter criteria.
    """
    return run_sync(self._async_client.list_projects(params, **kwargs))

list_deleted_projects

list_deleted_projects(
    params: ListParams | None = None, **kwargs
) -> list[dict]

List deleted projects in the Pixel system.

Parameters:

Name Type Description Default
params ListParams | None

Optional ListParams object containing filtering parameters such as offset, limit, search, etc.

None
**kwargs

Alternative way to provide filtering parameters. Ignored if params is provided.

{}

Returns:

Type Description
list[dict]

list[dict]: A list of deleted project objects.

Source code in src/pixel_client/_sync.py
216
217
218
219
220
221
222
223
224
225
226
227
228
def list_deleted_projects(
    self, params: ListParams | None = None, **kwargs
) -> list[dict]:
    """List deleted projects in the Pixel system.

    Args:
        params: Optional ListParams object containing filtering parameters such as offset, limit, search, etc.
        **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

    Returns:
        list[dict]: A list of deleted project objects.
    """
    return run_sync(self._async_client.list_deleted_projects(params, **kwargs))

move_project

move_project(
    project_id: int,
    new_parent_project_id: int | None = None,
) -> dict

Move a project to a new parent project or to the root level.

Parameters:

Name Type Description Default
project_id int

The ID of the project to move.

required
new_parent_project_id int | None

Optional ID of the new parent project. If None, the project will be moved to the root level.

None

Returns:

Name Type Description
dict dict

The updated project object.

Source code in src/pixel_client/_sync.py
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
def move_project(
    self, project_id: int, new_parent_project_id: int | None = None
) -> dict:
    """Move a project to a new parent project or to the root level.

    Args:
        project_id: The ID of the project to move.
        new_parent_project_id: Optional ID of the new parent project. If None, the project will be moved to the root level.

    Returns:
        dict: The updated project object.
    """
    return run_sync(
        self._async_client.move_project(project_id, new_parent_project_id)
    )

create_data_collection

create_data_collection(
    project_id: int,
    name: str,
    description: str,
    data_collection_type: Literal[
        "image", "raster", "RGB", "DTM", "DSM"
    ],
    tags: list[str] | None = None,
    raster_info: RasterInfo | None = None,
) -> dict

Create a new data collection within a project.

Parameters:

Name Type Description Default
project_id int

The ID of the project to create the data collection in.

required
name str

The name of the data collection.

required
description str

A description of the data collection.

required
data_collection_type Literal['image', 'raster', 'RGB', 'DTM', 'DSM']

The type of data collection (e.g., "image", "raster", "RGB", "DTM", "DSM").

required
tags list[str] | None

Optional list of tags to associate with the data collection.

None
raster_info RasterInfo | None

Optional RasterInfo object containing raster-specific configuration.

None

Returns:

Name Type Description
dict dict

The created data collection object.

Source code in src/pixel_client/_sync.py
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
def create_data_collection(
    self,
    project_id: int,
    name: str,
    description: str,
    data_collection_type: Literal["image", "raster", "RGB", "DTM", "DSM"],
    tags: list[str] | None = None,
    raster_info: RasterInfo | None = None,
) -> dict:
    """
    Create a new data collection within a project.

    Args:
        project_id: The ID of the project to create the data collection in.
        name: The name of the data collection.
        description: A description of the data collection.
        data_collection_type: The type of data collection (e.g., "image", "raster", "RGB", "DTM", "DSM").
        tags: Optional list of tags to associate with the data collection.
        raster_info: Optional RasterInfo object containing raster-specific configuration.

    Returns:
        dict: The created data collection object.
    """

    return run_sync(
        self._async_client.create_data_collection(
            project_id, name, description, data_collection_type, tags, raster_info
        )
    )

update_data_collection

update_data_collection(
    project_id: int,
    data_collection_id: int,
    name: str | None = None,
    description: str | None = None,
    add_tags: list[str] | None = None,
    remove_tags: list[str] | None = None,
) -> dict

Update an existing data collection with new values.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection to update.

required
name str | None

Optional new name for the data collection.

None
description str | None

Optional new description for the data collection.

None
add_tags list[str] | None

Optional list of tags to add to the data collection.

None
remove_tags list[str] | None

Optional list of tags to remove from the data collection.

None

Returns:

Name Type Description
dict dict

The updated data collection object.

Raises:

Type Description
ValueError

If no update parameters are provided.

Source code in src/pixel_client/_sync.py
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
def update_data_collection(
    self,
    project_id: int,
    data_collection_id: int,
    name: str | None = None,
    description: str | None = None,
    add_tags: list[str] | None = None,
    remove_tags: list[str] | None = None,
) -> dict:
    """
    Update an existing data collection with new values.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection to update.
        name: Optional new name for the data collection.
        description: Optional new description for the data collection.
        add_tags: Optional list of tags to add to the data collection.
        remove_tags: Optional list of tags to remove from the data collection.

    Returns:
        dict: The updated data collection object.

    Raises:
        ValueError: If no update parameters are provided.
    """

    return run_sync(
        self._async_client.update_data_collection(
            project_id, data_collection_id, name, description, add_tags, remove_tags
        )
    )

get_data_collection

get_data_collection(
    project_id: int, data_collection_id: int
) -> dict

Retrieve a data collection by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection to retrieve.

required

Returns:

Name Type Description
dict dict

The data collection object with its details.

Source code in src/pixel_client/_sync.py
309
310
311
312
313
314
315
316
317
318
319
320
321
322
def get_data_collection(self, project_id: int, data_collection_id: int) -> dict:
    """
    Retrieve a data collection by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection to retrieve.

    Returns:
        dict: The data collection object with its details.
    """
    return run_sync(
        self._async_client.get_data_collection(project_id, data_collection_id)
    )

list_data_collections

list_data_collections(
    project_id: int,
    params: DataCollectionListParams | None = None,
    **kwargs,
) -> list[dict]

List data collections within a project with optional filtering.

Parameters:

Name Type Description Default
project_id int

The ID of the project to list data collections from.

required
params DataCollectionListParams | None

Optional DataCollectionListParams object containing filtering parameters.

None
**kwargs

Alternative way to provide filtering parameters. Ignored if params is provided.

{}

Returns:

Type Description
list[dict]

list[dict]: A list of data collection objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
def list_data_collections(
    self, project_id: int, params: DataCollectionListParams | None = None, **kwargs
) -> list[dict]:
    """
    List data collections within a project with optional filtering.

    Args:
        project_id: The ID of the project to list data collections from.
        params: Optional DataCollectionListParams object containing filtering parameters.
        **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

    Returns:
        list[dict]: A list of data collection objects matching the filter criteria.
    """
    return run_sync(
        self._async_client.list_data_collections(project_id, params, **kwargs)
    )

list_deleted_data_collections

list_deleted_data_collections(
    project_id: int,
    params: DataCollectionListParams | None = None,
    **kwargs,
) -> list[dict]

List deleted data collections within a project.

Parameters:

Name Type Description Default
project_id int

The ID of the project to list deleted data collections from.

required

Returns:

Type Description
list[dict]

list[dict]: A list of deleted data collection objects.

Source code in src/pixel_client/_sync.py
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
def list_deleted_data_collections(
    self, project_id: int, params: DataCollectionListParams | None = None, **kwargs
) -> list[dict]:
    """List deleted data collections within a project.

    Args:
        project_id: The ID of the project to list deleted data collections from.

    Returns:
        list[dict]: A list of deleted data collection objects.
    """
    return run_sync(
        self._async_client.list_deleted_data_collections(
            project_id, params, **kwargs
        )
    )

delete_data_collection

delete_data_collection(
    project_id: int, data_collection_id: int
) -> dict

Delete a data collection by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection to delete.

required

Returns:

Name Type Description
dict dict

The response confirming deletion.

Source code in src/pixel_client/_sync.py
359
360
361
362
363
364
365
366
367
368
369
370
371
372
def delete_data_collection(self, project_id: int, data_collection_id: int) -> dict:
    """
    Delete a data collection by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection to delete.

    Returns:
        dict: The response confirming deletion.
    """
    return run_sync(
        self._async_client.delete_data_collection(project_id, data_collection_id)
    )

restore_data_collection

restore_data_collection(
    project_id: int, data_collection_id: int
) -> dict

Restore a deleted data collection by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection to restore.

required

Returns:

Name Type Description
dict dict

The restored data collection object.

Source code in src/pixel_client/_sync.py
374
375
376
377
378
379
380
381
382
383
384
385
386
def restore_data_collection(self, project_id: int, data_collection_id: int) -> dict:
    """Restore a deleted data collection by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection to restore.

    Returns:
        dict: The restored data collection object.
    """
    return run_sync(
        self._async_client.restore_data_collection(project_id, data_collection_id)
    )

move_data_collection

move_data_collection(
    project_id: int,
    data_collection_id: int,
    new_project_id: int,
) -> dict

Move a data collection to a different project.

Parameters:

Name Type Description Default
project_id int

The ID of the project currently containing the data collection.

required
data_collection_id int

The ID of the data collection to move.

required
new_project_id int

The ID of the project to move the data collection to.

required

Returns:

Name Type Description
dict dict

The updated data collection object.

Source code in src/pixel_client/_sync.py
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
def move_data_collection(
    self, project_id: int, data_collection_id: int, new_project_id: int
) -> dict:
    """
    Move a data collection to a different project.

    Args:
        project_id: The ID of the project currently containing the data collection.
        data_collection_id: The ID of the data collection to move.
        new_project_id: The ID of the project to move the data collection to.

    Returns:
        dict: The updated data collection object.
    """
    return run_sync(
        self._async_client.move_data_collection(
            project_id, data_collection_id, new_project_id
        )
    )

get_images

get_images(
    project_id: int,
    data_collection_id: int,
    params: ListParams | None = None,
    **kwargs,
) -> dict

Retrieve images from a data collection with optional filtering.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the images.

required
params ListParams | None

Optional ListParams object containing filtering parameters.

None
**kwargs

Alternative way to provide filtering parameters.

{}

Returns:

Name Type Description
dict dict

A list of image objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
def get_images(
    self,
    project_id: int,
    data_collection_id: int,
    params: ListParams | None = None,
    **kwargs,
) -> dict:
    """
    Retrieve images from a data collection with optional filtering.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the images.
        params: Optional ListParams object containing filtering parameters.
        **kwargs: Alternative way to provide filtering parameters.

    Returns:
        dict: A list of image objects matching the filter criteria.
    """
    return run_sync(
        self._async_client.get_images(
            project_id, data_collection_id, params, **kwargs
        )
    )

paginate_images

paginate_images(
    project_id: int,
    data_collection_id: int,
    page_size: int,
    params: ListParams | None = None,
    **kwargs,
) -> Iterator[dict]

Paginate through images in a data collection with optional filtering.

This method returns an async generator that yields images one at a time, automatically handling pagination in the background.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the images.

required
page_size int

The number of images to fetch per page.

required
params ListParams | None

Optional ListParams object containing filtering parameters (excluding offset and limit).

None
**kwargs

Alternative way to provide filtering parameters.

{}

Yields:

Name Type Description
dict dict

Image objects matching the filter criteria, one at a time.

Source code in src/pixel_client/_sync.py
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
def paginate_images(
    self,
    project_id: int,
    data_collection_id: int,
    page_size: int,
    params: ListParams | None = None,
    **kwargs,
) -> Iterator[dict]:
    """
    Paginate through images in a data collection with optional filtering.

    This method returns an async generator that yields images one at a time,
    automatically handling pagination in the background.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the images.
        page_size: The number of images to fetch per page.
        params: Optional ListParams object containing filtering parameters (excluding offset and limit).
        **kwargs: Alternative way to provide filtering parameters.

    Yields:
        dict: Image objects matching the filter criteria, one at a time.
    """
    return iter_over_async(
        self._async_client.paginate_images(
            project_id,
            data_collection_id,
            page_size,
            params,
            **kwargs,
        )
    )

get_image

get_image(
    project_id: int, data_collection_id: int, image_id: int
) -> dict

Retrieve a specific image by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the image.

required
image_id int

The ID of the image to retrieve.

required

Returns:

Name Type Description
dict dict

The image object with its details.

Source code in src/pixel_client/_sync.py
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
def get_image(
    self, project_id: int, data_collection_id: int, image_id: int
) -> dict:
    """
    Retrieve a specific image by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the image.
        image_id: The ID of the image to retrieve.

    Returns:
        dict: The image object with its details.
    """
    return run_sync(
        self._async_client.get_image(project_id, data_collection_id, image_id)
    )

get_image_metadata

get_image_metadata(
    project_id: int, data_collection_id: int, image_id: int
) -> dict

Retrieve metadata for a specific image by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the image.

required
image_id int

The ID of the image to retrieve metadata for.

required

Returns:

Name Type Description
dict dict

The image metadata object with its details.

Source code in src/pixel_client/_sync.py
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
def get_image_metadata(
    self, project_id: int, data_collection_id: int, image_id: int
) -> dict:
    """
    Retrieve metadata for a specific image by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the image.
        image_id: The ID of the image to retrieve metadata for.

    Returns:
        dict: The image metadata object with its details.
    """
    return run_sync(
        self._async_client.get_image_metadata(
            project_id, data_collection_id, image_id
        )
    )

update_image

update_image(
    project_id: int,
    data_collection_id: int,
    image_id: int,
    update_input: ImageUpdateInput,
) -> dict

Update an existing image with new values.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the image.

required
image_id int

The ID of the image to update.

required
update_input ImageUpdateInput

ImageUpdateInput object containing the fields to update.

required

Returns:

Name Type Description
dict dict

The updated image object.

Source code in src/pixel_client/_sync.py
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
def update_image(
    self,
    project_id: int,
    data_collection_id: int,
    image_id: int,
    update_input: ImageUpdateInput,
) -> dict:
    """
    Update an existing image with new values.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the image.
        image_id: The ID of the image to update.
        update_input: ImageUpdateInput object containing the fields to update.

    Returns:
        dict: The updated image object.
    """
    return run_sync(
        self._async_client.update_image(
            project_id, data_collection_id, image_id, update_input
        )
    )

delete_image

delete_image(
    project_id: int, data_collection_id: int, image_id: int
) -> dict

Delete a specific image by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the image.

required
image_id int

The ID of the image to delete.

required

Returns:

Name Type Description
dict dict

The response confirming deletion.

Source code in src/pixel_client/_sync.py
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
def delete_image(
    self, project_id: int, data_collection_id: int, image_id: int
) -> dict:
    """
    Delete a specific image by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the image.
        image_id: The ID of the image to delete.

    Returns:
        dict: The response confirming deletion.
    """
    return run_sync(
        self._async_client.delete_image(project_id, data_collection_id, image_id)
    )

get_rasters

get_rasters(
    project_id: int,
    data_collection_id: int,
    params: ListParams | None = None,
    **kwargs,
) -> dict

Retrieve rasters from a data collection with optional filtering.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the rasters.

required
params ListParams | None

Optional ListParams object containing filtering parameters.

None
**kwargs

Alternative way to provide filtering parameters.

{}

Returns:

Name Type Description
dict dict

A list of raster objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
def get_rasters(
    self,
    project_id: int,
    data_collection_id: int,
    params: ListParams | None = None,
    **kwargs,
) -> dict:
    """
    Retrieve rasters from a data collection with optional filtering.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the rasters.
        params: Optional ListParams object containing filtering parameters.
        **kwargs: Alternative way to provide filtering parameters.

    Returns:
        dict: A list of raster objects matching the filter criteria.
    """
    return run_sync(
        self._async_client.get_rasters(
            project_id, data_collection_id, params, **kwargs
        )
    )

paginate_rasters

paginate_rasters(
    project_id: int,
    data_collection_id: int,
    page_size: int,
    params: ListParams | None = None,
    **kwargs,
) -> Iterator[dict]

Paginate through rasters in a data collection with optional filtering.

This method returns an async generator that yields rasters one at a time, automatically handling pagination in the background.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the rasters.

required
page_size int

The number of rasters to fetch per page.

required
params ListParams | None

Optional ListParams object containing filtering parameters (excluding offset and limit).

None
**kwargs

Alternative way to provide filtering parameters.

{}

Yields:

Name Type Description
dict dict

Raster objects matching the filter criteria, one at a time.

Source code in src/pixel_client/_sync.py
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
def paginate_rasters(
    self,
    project_id: int,
    data_collection_id: int,
    page_size: int,
    params: ListParams | None = None,
    **kwargs,
) -> Iterator[dict]:
    """
    Paginate through rasters in a data collection with optional filtering.

    This method returns an async generator that yields rasters one at a time,
    automatically handling pagination in the background.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the rasters.
        page_size: The number of rasters to fetch per page.
        params: Optional ListParams object containing filtering parameters (excluding offset and limit).
        **kwargs: Alternative way to provide filtering parameters.

    Yields:
        dict: Raster objects matching the filter criteria, one at a time.
    """
    return iter_over_async(
        self._async_client.paginate_rasters(
            project_id,
            data_collection_id=data_collection_id,
            page_size=page_size,
            params=params,
            **kwargs,
        )
    )

get_raster

get_raster(
    project_id: int, data_collection_id: int, raster_id: int
) -> dict

Retrieve a specific raster by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the raster.

required
raster_id int

The ID of the raster to retrieve.

required

Returns:

Name Type Description
dict dict

The raster object with its details.

Source code in src/pixel_client/_sync.py
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
def get_raster(
    self, project_id: int, data_collection_id: int, raster_id: int
) -> dict:
    """
    Retrieve a specific raster by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the raster.
        raster_id: The ID of the raster to retrieve.

    Returns:
        dict: The raster object with its details.
    """
    return run_sync(
        self._async_client.get_raster(project_id, data_collection_id, raster_id)
    )

update_raster

update_raster(
    project_id: int,
    data_collection_id: int,
    raster_id: int,
    update_input: RasterUpdateInput,
) -> dict

Update an existing raster with new values.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the raster.

required
raster_id int

The ID of the raster to update.

required
update_input RasterUpdateInput

RasterUpdateInput object containing the fields to update.

required

Returns:

Name Type Description
dict dict

The updated raster object.

Source code in src/pixel_client/_sync.py
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
def update_raster(
    self,
    project_id: int,
    data_collection_id: int,
    raster_id: int,
    update_input: RasterUpdateInput,
) -> dict:
    """
    Update an existing raster with new values.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the raster.
        raster_id: The ID of the raster to update.
        update_input: RasterUpdateInput object containing the fields to update.

    Returns:
        dict: The updated raster object.
    """
    return run_sync(
        self._async_client.update_raster(
            project_id, data_collection_id, raster_id, update_input
        )
    )

delete_raster

delete_raster(
    project_id: int, data_collection_id: int, raster_id: int
) -> dict

Delete a specific raster by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the raster.

required
raster_id int

The ID of the raster to delete.

required

Returns:

Name Type Description
dict dict

The response confirming deletion.

Source code in src/pixel_client/_sync.py
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
def delete_raster(
    self, project_id: int, data_collection_id: int, raster_id: int
) -> dict:
    """
    Delete a specific raster by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the raster.
        raster_id: The ID of the raster to delete.

    Returns:
        dict: The response confirming deletion.
    """

    return run_sync(
        self._async_client.delete_raster(project_id, data_collection_id, raster_id)
    )

get_upload_jobs

get_upload_jobs(
    project_id: int,
    data_collection_id: int,
    params: ListParams | None = None,
    **kwargs,
) -> list[dict]

Retrieve upload jobs for a data collection with optional filtering.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection to list upload jobs for.

required
params ListParams | None

Optional ListParams object containing filtering parameters.

None
**kwargs

Alternative way to provide filtering parameters. Ignored if params is provided.

{}

Returns:

Type Description
list[dict]

list[dict]: A list of upload job objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
def get_upload_jobs(
    self,
    project_id: int,
    data_collection_id: int,
    params: ListParams | None = None,
    **kwargs,
) -> list[dict]:
    """
    Retrieve upload jobs for a data collection with optional filtering.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection to list upload jobs for.
        params: Optional ListParams object containing filtering parameters.
        **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

    Returns:
        list[dict]: A list of upload job objects matching the filter criteria.
    """
    return run_sync(
        self._async_client.get_upload_jobs(
            project_id, data_collection_id, params, **kwargs
        )
    )

upload_image

upload_image(
    project_id: int,
    data_collection_id: int,
    file_path: Path,
    metadata: dict | None = None,
    support_files: list[Path] | None = None,
    multipart: bool = False,
    multipart_part_size: int | None = None,
) -> dict

Upload an image file to an image data collection.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the image data collection to upload to.

required
file_path Path

Path to the image file to upload.

required
metadata dict | None

Optional dictionary of metadata to associate with the image.

None
support_files list[Path] | None

Optional list of support file paths to upload with the image.

None
multipart bool

If True, use multipart upload for large files.

False
multipart_part_size int | None

Required size of each part in bytes when using multipart upload.

None

Returns:

Name Type Description
dict dict

The created image object.

Raises:

Type Description
ValueError

If the data collection is not an image data collection.

FileNotFoundError

If the file does not exist.

ValueError

If multipart is True but multipart_part_size is not provided.

Source code in src/pixel_client/_sync.py
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
def upload_image(
    self,
    project_id: int,
    data_collection_id: int,
    file_path: Path,
    metadata: dict | None = None,
    support_files: list[Path] | None = None,
    multipart: bool = False,
    multipart_part_size: int | None = None,
) -> dict:
    """
    Upload an image file to an image data collection.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the image data collection to upload to.
        file_path: Path to the image file to upload.
        metadata: Optional dictionary of metadata to associate with the image.
        support_files: Optional list of support file paths to upload with the image.
        multipart: If True, use multipart upload for large files.
        multipart_part_size: Required size of each part in bytes when using multipart upload.

    Returns:
        dict: The created image object.

    Raises:
        ValueError: If the data collection is not an image data collection.
        FileNotFoundError: If the file does not exist.
        ValueError: If multipart is True but multipart_part_size is not provided.
    """
    return run_sync(
        self._async_client.upload_image(
            project_id,
            data_collection_id,
            file_path,
            metadata,
            support_files,
            multipart,
            multipart_part_size,
        )
    )

upload_multiple_images

upload_multiple_images(
    project_id: int,
    data_collection_id: int,
    files: list[PixelUploadFile],
    multipart: bool = False,
    multipart_part_size: int | None = None,
) -> tuple[list[dict], list[PixelUploadJobError]]

Upload multiple image files to an image data collection.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the image data collection to upload to.

required
files list[PixelUploadFile]

List of PixelUploadFile objects containing the files to upload.

required
multipart bool

If True, use multipart upload for large files.

False
multipart_part_size int | None

Required size of each part in bytes when using multipart upload.

None

Returns:

Name Type Description
tuple tuple[list[dict], list[PixelUploadJobError]]

A tuple containing: - list[dict]: List of created image objects. - list[PixelUploadJobError]: List of errors that occurred during upload.

Raises:

Type Description
ValueError

If the data collection is not an image data collection.

ValueError

If any files have duplicate names.

ValueError

If multipart is True but multipart_part_size is not provided.

Source code in src/pixel_client/_sync.py
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
def upload_multiple_images(
    self,
    project_id: int,
    data_collection_id: int,
    files: list[PixelUploadFile],
    multipart: bool = False,
    multipart_part_size: int | None = None,
) -> tuple[list[dict], list[PixelUploadJobError]]:
    """
    Upload multiple image files to an image data collection.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the image data collection to upload to.
        files: List of PixelUploadFile objects containing the files to upload.
        multipart: If True, use multipart upload for large files.
        multipart_part_size: Required size of each part in bytes when using multipart upload.

    Returns:
        tuple: A tuple containing:
            - list[dict]: List of created image objects.
            - list[PixelUploadJobError]: List of errors that occurred during upload.

    Raises:
        ValueError: If the data collection is not an image data collection.
        ValueError: If any files have duplicate names.
        ValueError: If multipart is True but multipart_part_size is not provided.
    """
    return run_sync(
        self._async_client.upload_multiple_images(
            project_id, data_collection_id, files, multipart, multipart_part_size
        )
    )

upload_raster

upload_raster(
    project_id: int,
    data_collection_id: int,
    file_path: Path,
    support_files: list[Path] | None = None,
    multipart: bool = False,
    multipart_part_size: int | None = None,
) -> dict

Upload a raster file to a raster data collection.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the raster data collection to upload to.

required
file_path Path

Path to the raster file to upload.

required
support_files list[Path] | None

Optional list of support file paths to upload with the raster.

None
multipart bool

If True, use multipart upload for large files.

False
multipart_part_size int | None

Required size of each part in bytes when using multipart upload.

None

Returns:

Name Type Description
dict dict

The created raster object.

Raises:

Type Description
ValueError

If the data collection is not a raster data collection.

FileNotFoundError

If the file does not exist.

ValueError

If multipart is True but multipart_part_size is not provided.

Source code in src/pixel_client/_sync.py
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
def upload_raster(
    self,
    project_id: int,
    data_collection_id: int,
    file_path: Path,
    support_files: list[Path] | None = None,
    multipart: bool = False,
    multipart_part_size: int | None = None,
) -> dict:
    """
    Upload a raster file to a raster data collection.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the raster data collection to upload to.
        file_path: Path to the raster file to upload.
        support_files: Optional list of support file paths to upload with the raster.
        multipart: If True, use multipart upload for large files.
        multipart_part_size: Required size of each part in bytes when using multipart upload.

    Returns:
        dict: The created raster object.

    Raises:
        ValueError: If the data collection is not a raster data collection.
        FileNotFoundError: If the file does not exist.
        ValueError: If multipart is True but multipart_part_size is not provided.
    """
    return run_sync(
        self._async_client.upload_raster(
            project_id,
            data_collection_id,
            file_path,
            support_files,
            multipart,
            multipart_part_size,
        )
    )

upload_multiple_rasters

upload_multiple_rasters(
    project_id: int,
    data_collection_id: int,
    files: list[PixelUploadFile],
    multipart: bool = False,
    multipart_part_size: int | None = None,
) -> tuple[list[dict], list[PixelUploadJobError]]

Upload multiple raster files to a raster data collection.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the raster data collection to upload to.

required
files list[PixelUploadFile]

List of PixelUploadFile objects containing the files to upload.

required
multipart bool

If True, use multipart upload for large files.

False
multipart_part_size int | None

Required size of each part in bytes when using multipart upload.

None

Returns:

Name Type Description
tuple tuple[list[dict], list[PixelUploadJobError]]

A tuple containing: - list[dict]: List of created raster objects. - list[PixelUploadJobError]: List of errors that occurred during upload.

Raises:

Type Description
ValueError

If the data collection is not a raster data collection.

ValueError

If any files have duplicate names.

ValueError

If multipart is True but multipart_part_size is not provided.

Source code in src/pixel_client/_sync.py
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
def upload_multiple_rasters(
    self,
    project_id: int,
    data_collection_id: int,
    files: list[PixelUploadFile],
    multipart: bool = False,
    multipart_part_size: int | None = None,
) -> tuple[list[dict], list[PixelUploadJobError]]:
    """
    Upload multiple raster files to a raster data collection.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the raster data collection to upload to.
        files: List of PixelUploadFile objects containing the files to upload.
        multipart: If True, use multipart upload for large files.
        multipart_part_size: Required size of each part in bytes when using multipart upload.

    Returns:
        tuple: A tuple containing:
            - list[dict]: List of created raster objects.
            - list[PixelUploadJobError]: List of errors that occurred during upload.

    Raises:
        ValueError: If the data collection is not a raster data collection.
        ValueError: If any files have duplicate names.
        ValueError: If multipart is True but multipart_part_size is not provided.
    """
    return run_sync(
        self._async_client.upload_multiple_rasters(
            project_id, data_collection_id, files, multipart, multipart_part_size
        )
    )

create_optimized_rasters

create_optimized_rasters(
    project_id: int,
    data_collection_id: int,
    raster_ids: list[int] | None,
    profile: str | None = None,
    nearblack: NearblackOptions | None = None,
    overview_resampling: OverviewResampling = "average",
) -> list[dict]

Create optimized raster objects in the database.

This function creates optimized raster objects but does not run the actual optimization process. To run the optimization, use the run_optimize_rasters function with the returned optimized raster IDs.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the rasters.

required
raster_ids list[int] | None

Optional list of raster IDs to optimize. If None, all rasters in the collection will be optimized.

required
profile str | None

Optional profile name to use for optimization.

None
nearblack NearblackOptions | None

Optional NearblackOptions object for configuring the nearblack process.

None
overview_resampling OverviewResampling

The resampling method to use for creating overviews. Default is "average".

'average'

Returns:

Type Description
list[dict]

list[dict]: List of created optimized raster objects.

Source code in src/pixel_client/_sync.py
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
def create_optimized_rasters(
    self,
    project_id: int,
    data_collection_id: int,
    raster_ids: list[int] | None,
    profile: str | None = None,
    nearblack: NearblackOptions | None = None,
    overview_resampling: OverviewResampling = "average",
) -> list[dict]:
    """
    Create optimized raster objects in the database.

    This function creates optimized raster objects but does not run the actual optimization process.
    To run the optimization, use the run_optimize_rasters function with the returned optimized raster IDs.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the rasters.
        raster_ids: Optional list of raster IDs to optimize. If None, all rasters in the collection will be optimized.
        profile: Optional profile name to use for optimization.
        nearblack: Optional NearblackOptions object for configuring the nearblack process.
        overview_resampling: The resampling method to use for creating overviews. Default is "average".

    Returns:
        list[dict]: List of created optimized raster objects.
    """
    return run_sync(
        self._async_client.create_optimized_rasters(
            project_id,
            data_collection_id,
            raster_ids,
            profile,
            nearblack,
            overview_resampling,
        )
    )

get_optimized_rasters

get_optimized_rasters(
    project_id: int,
    data_collection_id: int,
    params: ListParams,
    **kwargs,
) -> list[dict]

Retrieve optimized rasters from a data collection with optional filtering.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the optimized rasters.

required
params ListParams

Optional ListParams object containing filtering parameters.

required
**kwargs

Alternative way to provide filtering parameters.

{}

Returns:

Type Description
list[dict]

list[dict]: A list of optimized raster objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
def get_optimized_rasters(
    self, project_id: int, data_collection_id: int, params: ListParams, **kwargs
) -> list[dict]:
    """
    Retrieve optimized rasters from a data collection with optional filtering.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the optimized rasters.
        params: Optional ListParams object containing filtering parameters.
        **kwargs: Alternative way to provide filtering parameters.

    Returns:
        list[dict]: A list of optimized raster objects matching the filter criteria.
    """
    return run_sync(
        self._async_client.get_optimized_rasters(
            project_id, data_collection_id, params, **kwargs
        )
    )

delete_optimized_rasters

delete_optimized_rasters(
    project_id: int,
    data_collection_id: int,
    raster_id: int,
    profile: str | None = None,
) -> list[dict]

Delete optimized rasters associated with a specific raster.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the raster.

required
raster_id int

The ID of the raster whose optimized versions should be deleted.

required
profile str | None

Optional profile name to filter which optimized rasters to delete. If None, all optimized versions of the raster will be deleted.

None

Returns:

Type Description
list[dict]

list[dict]: A list of the deleted optimized raster objects.

Source code in src/pixel_client/_sync.py
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
def delete_optimized_rasters(
    self,
    project_id: int,
    data_collection_id: int,
    raster_id: int,
    profile: str | None = None,
) -> list[dict]:
    """
    Delete optimized rasters associated with a specific raster.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the raster.
        raster_id: The ID of the raster whose optimized versions should be deleted.
        profile: Optional profile name to filter which optimized rasters to delete.
                If None, all optimized versions of the raster will be deleted.

    Returns:
        list[dict]: A list of the deleted optimized raster objects.
    """
    return run_sync(
        self._async_client.delete_optimized_rasters(
            project_id, data_collection_id, raster_id, profile
        )
    )

optimize_rasters

optimize_rasters(
    project_id: int,
    data_collection_id: int,
    raster_ids: list[int] | None = None,
    profile: str | None = None,
    nearblack: NearblackOptions | None = None,
    overview_resampling: OverviewResampling = "average",
) -> list[dict]

Create and run optimization on rasters in a data collection.

This is a convenience method that combines create_optimized_rasters and run_optimize_rasters into a single operation.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the rasters.

required
raster_ids list[int] | None

Optional list of raster IDs to optimize. If None, all rasters in the collection will be optimized.

None
profile str | None

Optional profile name to use for optimization.

None
nearblack NearblackOptions | None

Optional NearblackOptions object for configuring the nearblack process.

None
overview_resampling OverviewResampling

The resampling method to use for creating overviews. Default is "average".

'average'

Returns:

Type Description
list[dict]

list[dict]: List of optimized raster objects after the optimization process has completed.

Source code in src/pixel_client/_sync.py
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
def optimize_rasters(
    self,
    project_id: int,
    data_collection_id: int,
    raster_ids: list[int] | None = None,
    profile: str | None = None,
    nearblack: NearblackOptions | None = None,
    overview_resampling: OverviewResampling = "average",
) -> list[dict]:
    """
    Create and run optimization on rasters in a data collection.

    This is a convenience method that combines create_optimized_rasters and run_optimize_rasters
    into a single operation.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the rasters.
        raster_ids: Optional list of raster IDs to optimize. If None, all rasters in the collection will be optimized.
        profile: Optional profile name to use for optimization.
        nearblack: Optional NearblackOptions object for configuring the nearblack process.
        overview_resampling: The resampling method to use for creating overviews. Default is "average".

    Returns:
        list[dict]: List of optimized raster objects after the optimization process has completed.
    """
    return run_sync(
        self._async_client.optimize_rasters(
            project_id,
            data_collection_id,
            raster_ids,
            profile,
            nearblack,
            overview_resampling,
        )
    )

run_optimize_rasters

run_optimize_rasters(
    project_id: int,
    data_collection_id: int,
    optimize_raster_ids: list[int] | None,
    retry_failed: bool = False,
) -> dict

Run the optimization process on optimized raster objects.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the optimized rasters.

required
optimize_raster_ids list[int] | None

Optional list of optimized raster IDs to process. If None, all optimized rasters in the collection will be processed.

required
retry_failed bool

If True, retry previously failed optimization jobs.

False

Returns:

Name Type Description
dict dict

The group job object representing the optimization process.

Source code in src/pixel_client/_sync.py
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
def run_optimize_rasters(
    self,
    project_id: int,
    data_collection_id: int,
    optimize_raster_ids: list[int] | None,
    retry_failed: bool = False,
) -> dict:
    """
    Run the optimization process on optimized raster objects.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the optimized rasters.
        optimize_raster_ids: Optional list of optimized raster IDs to process. If None, all optimized rasters in the collection will be processed.
        retry_failed: If True, retry previously failed optimization jobs.

    Returns:
        dict: The group job object representing the optimization process.
    """
    return run_sync(
        self._async_client.run_optimize_rasters(
            project_id, data_collection_id, optimize_raster_ids, retry_failed
        )
    )

get_job

get_job(job_id: int) -> dict

Retrieve information about a specific job.

Parameters:

Name Type Description Default
job_id int

The ID of the job to retrieve.

required

Returns:

Name Type Description
dict dict

The job object with its details.

Source code in src/pixel_client/_sync.py
989
990
991
992
993
994
995
996
997
998
999
def get_job(self, job_id: int) -> dict:
    """
    Retrieve information about a specific job.

    Args:
        job_id: The ID of the job to retrieve.

    Returns:
        dict: The job object with its details.
    """
    return run_sync(self._async_client.get_job(job_id))

get_job_group

get_job_group(job_id: int) -> dict

Retrieve information about a specific job group.

Parameters:

Name Type Description Default
job_id int

The ID of the job group to retrieve.

required

Returns:

Name Type Description
dict dict

The job group object with its details.

Source code in src/pixel_client/_sync.py
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
def get_job_group(self, job_id: int) -> dict:
    """
    Retrieve information about a specific job group.

    Args:
        job_id: The ID of the job group to retrieve.

    Returns:
        dict: The job group object with its details.
    """
    return run_sync(self._async_client.get_job_group(job_id))

wait_for_job

wait_for_job(job_id: int, timeout: int = 600) -> dict

Wait for a job to complete, polling its status at regular intervals.

Parameters:

Name Type Description Default
job_id int

The ID of the job to wait for.

required
timeout int

Maximum time to wait in seconds before raising a TimeoutError. Default is 600 seconds (10 minutes).

600

Returns:

Name Type Description
dict dict

The completed job object.

Raises:

Type Description
TimeoutError

If the job does not complete within the specified timeout period.

Source code in src/pixel_client/_sync.py
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
def wait_for_job(self, job_id: int, timeout: int = 600) -> dict:
    """
    Wait for a job to complete, polling its status at regular intervals.

    Args:
        job_id: The ID of the job to wait for.
        timeout: Maximum time to wait in seconds before raising a TimeoutError. Default is 600 seconds (10 minutes).

    Returns:
        dict: The completed job object.

    Raises:
        TimeoutError: If the job does not complete within the specified timeout period.
    """
    return run_sync(self._async_client.wait_for_job(job_id, timeout))

wait_for_group_job

wait_for_group_job(
    group_job_id: int, timeout: int = 1200
) -> dict

Wait for a group job to complete, polling its status at regular intervals.

A group job consists of multiple individual jobs. This method displays a progress bar showing the completion status of all jobs in the group.

Parameters:

Name Type Description Default
group_job_id int

The ID of the group job to wait for.

required
timeout int

Maximum time to wait in seconds before raising a TimeoutError. Default is 1200 seconds (20 minutes).

1200

Returns:

Name Type Description
dict dict

The completed group job object.

Raises:

Type Description
TimeoutError

If the group job does not complete within the specified timeout period.

Source code in src/pixel_client/_sync.py
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
def wait_for_group_job(self, group_job_id: int, timeout: int = 1200) -> dict:
    """
    Wait for a group job to complete, polling its status at regular intervals.

    A group job consists of multiple individual jobs. This method displays a progress bar
    showing the completion status of all jobs in the group.

    Args:
        group_job_id: The ID of the group job to wait for.
        timeout: Maximum time to wait in seconds before raising a TimeoutError. Default is 1200 seconds (20 minutes).

    Returns:
        dict: The completed group job object.

    Raises:
        TimeoutError: If the group job does not complete within the specified timeout period.
    """
    return run_sync(self._async_client.wait_for_group_job(group_job_id, timeout))

list_gdo_users

list_gdo_users() -> list[str]

Retrieve a list of GDO (GeoData Online) users.

Returns:

Type Description
list[str]

list[dict]: A list of GDO user names.

Source code in src/pixel_client/_sync.py
1048
1049
1050
1051
1052
1053
1054
1055
def list_gdo_users(self) -> list[str]:
    """
    Retrieve a list of GDO (GeoData Online) users.

    Returns:
        list[dict]: A list of GDO user names.
    """
    return run_sync(self._async_client.list_gdo_users())

create_arcgis_service

create_arcgis_service(
    service_type: Literal["Feature", "Image"],
    create_input: ArcgisServiceCreateInput,
) -> dict

Create a new ArcGIS service.

Parameters:

Name Type Description Default
service_type Literal['Feature', 'Image']

The type of service to create, either "Feature" or "Image".

required
create_input ArcgisServiceCreateInput

ArcgisServiceCreateInput object containing the service configuration.

required

Returns:

Name Type Description
dict dict

The created ArcGIS service object.

Raises:

Type Description
AssertionError

If the create_input does not contain the appropriate service options for the specified service_type.

Source code in src/pixel_client/_sync.py
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
def create_arcgis_service(
    self,
    service_type: Literal["Feature", "Image"],
    create_input: ArcgisServiceCreateInput,
) -> dict:
    """
    Create a new ArcGIS service.

    Args:
        service_type: The type of service to create, either "Feature" or "Image".
        create_input: ArcgisServiceCreateInput object containing the service configuration.

    Returns:
        dict: The created ArcGIS service object.

    Raises:
        AssertionError: If the create_input does not contain the appropriate service options for the specified service_type.
    """
    return run_sync(
        self._async_client.create_arcgis_service(service_type, create_input)
    )

list_arcgis_services

list_arcgis_services(
    service_type: Literal["Feature", "Image"],
    params: ListParams | None = None,
    **kwargs,
) -> list[dict]

List ArcGIS services of a specific type with optional filtering.

Parameters:

Name Type Description Default
service_type Literal['Feature', 'Image']

The type of services to list, either "Feature" or "Image".

required
params ListParams | None

Optional ListParams object containing filtering parameters.

None
**kwargs

Alternative way to provide filtering parameters.

{}

Returns:

Type Description
list[dict]

list[dict]: A list of ArcGIS service objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
def list_arcgis_services(
    self,
    service_type: Literal["Feature", "Image"],
    params: ListParams | None = None,
    **kwargs,
) -> list[dict]:
    """
    List ArcGIS services of a specific type with optional filtering.

    Args:
        service_type: The type of services to list, either "Feature" or "Image".
        params: Optional ListParams object containing filtering parameters.
        **kwargs: Alternative way to provide filtering parameters.

    Returns:
        list[dict]: A list of ArcGIS service objects matching the filter criteria.
    """
    return run_sync(
        self._async_client.list_arcgis_services(service_type, params, **kwargs)
    )

get_arcgis_service

get_arcgis_service(
    service_type: Literal["Feature", "Image"],
    service_id: int,
) -> dict

Retrieve a specific ArcGIS service by its ID.

Parameters:

Name Type Description Default
service_type Literal['Feature', 'Image']

The type of service, either "Feature" or "Image".

required
service_id int

The ID of the service to retrieve.

required

Returns:

Name Type Description
dict dict

The ArcGIS service object with its details.

Source code in src/pixel_client/_sync.py
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
def get_arcgis_service(
    self, service_type: Literal["Feature", "Image"], service_id: int
) -> dict:
    """
    Retrieve a specific ArcGIS service by its ID.

    Args:
        service_type: The type of service, either "Feature" or "Image".
        service_id: The ID of the service to retrieve.

    Returns:
        dict: The ArcGIS service object with its details.
    """
    return run_sync(self._async_client.get_arcgis_service(service_type, service_id))

delete_arcgis_service

delete_arcgis_service(
    service_type: Literal["Feature", "Image"],
    service_id: int,
) -> dict

Delete a specific ArcGIS service by its ID.

Parameters:

Name Type Description Default
service_type Literal['Feature', 'Image']

The type of service, either "Feature" or "Image".

required
service_id int

The ID of the service to delete.

required

Returns:

Name Type Description
dict dict

The response confirming deletion.

Source code in src/pixel_client/_sync.py
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
def delete_arcgis_service(
    self, service_type: Literal["Feature", "Image"], service_id: int
) -> dict:
    """
    Delete a specific ArcGIS service by its ID.

    Args:
        service_type: The type of service, either "Feature" or "Image".
        service_id: The ID of the service to delete.

    Returns:
        dict: The response confirming deletion.
    """
    return run_sync(
        self._async_client.delete_arcgis_service(service_type, service_id)
    )

update_arcgis_service

update_arcgis_service(
    service_type: Literal["Feature", "Image"],
    service_id: int,
    update_input: ArcgisServiceUpdateInput,
) -> dict

Update an existing ArcGIS service with new values.

Parameters:

Name Type Description Default
service_type Literal['Feature', 'Image']

The type of service, either "Feature" or "Image".

required
service_id int

The ID of the service to update.

required
update_input ArcgisServiceUpdateInput

ArcgisServiceUpdateInput object containing the fields to update.

required

Returns:

Name Type Description
dict dict

The updated ArcGIS service object.

Source code in src/pixel_client/_sync.py
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
def update_arcgis_service(
    self,
    service_type: Literal["Feature", "Image"],
    service_id: int,
    update_input: ArcgisServiceUpdateInput,
) -> dict:
    """
    Update an existing ArcGIS service with new values.

    Args:
        service_type: The type of service, either "Feature" or "Image".
        service_id: The ID of the service to update.
        update_input: ArcgisServiceUpdateInput object containing the fields to update.

    Returns:
        dict: The updated ArcGIS service object.
    """
    return run_sync(
        self._async_client.update_arcgis_service(
            service_type, service_id, update_input
        )
    )

start_arcgis_service

start_arcgis_service(
    service_type: Literal["Feature", "Image"],
    service_id: int,
    wait: bool = True,
) -> dict

Start a specific ArcGIS service.

Parameters:

Name Type Description Default
service_type Literal['Feature', 'Image']

The type of service, either "Feature" or "Image".

required
service_id int

The ID of the service to start.

required
wait bool

If True, wait for the start operation to complete before returning. If False, return immediately after initiating the start operation.

True

Returns:

Name Type Description
dict dict

A response object containing job information and, if wait is True, the updated service object after starting.

Source code in src/pixel_client/_sync.py
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
def start_arcgis_service(
    self,
    service_type: Literal["Feature", "Image"],
    service_id: int,
    wait: bool = True,
) -> dict:
    """
    Start a specific ArcGIS service.

    Args:
        service_type: The type of service, either "Feature" or "Image".
        service_id: The ID of the service to start.
        wait: If True, wait for the start operation to complete before returning.
             If False, return immediately after initiating the start operation.

    Returns:
        dict: A response object containing job information and, if wait is True,
             the updated service object after starting.
    """
    return run_sync(
        self._async_client.start_arcgis_service(service_type, service_id, wait)
    )

stop_arcgis_service

stop_arcgis_service(
    service_type: Literal["Feature", "Image"],
    service_id: int,
    wait: bool = True,
) -> dict

Stop a specific ArcGIS service.

Parameters:

Name Type Description Default
service_type Literal['Feature', 'Image']

The type of service, either "Feature" or "Image".

required
service_id int

The ID of the service to stop.

required
wait bool

If True, wait for the stop operation to complete before returning. If False, return immediately after initiating the stop operation.

True

Returns:

Name Type Description
dict dict

A response object containing job information and, if wait is True, the updated service object after stopping.

Source code in src/pixel_client/_sync.py
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
def stop_arcgis_service(
    self,
    service_type: Literal["Feature", "Image"],
    service_id: int,
    wait: bool = True,
) -> dict:
    """
    Stop a specific ArcGIS service.

    Args:
        service_type: The type of service, either "Feature" or "Image".
        service_id: The ID of the service to stop.
        wait: If True, wait for the stop operation to complete before returning.
             If False, return immediately after initiating the stop operation.

    Returns:
        dict: A response object containing job information and, if wait is True,
             the updated service object after stopping.
    """
    return run_sync(
        self._async_client.stop_arcgis_service(service_type, service_id, wait)
    )

refresh_arcgis_service

refresh_arcgis_service(
    service_type: Literal["Feature", "Image"],
    service_id: int,
    refresh_data: bool = False,
    wait: bool = True,
) -> dict

Refresh a specific ArcGIS service, optionally refreshing its data.

Parameters:

Name Type Description Default
service_type Literal['Feature', 'Image']

The type of service, either "Feature" or "Image".

required
service_id int

The ID of the service to refresh.

required
refresh_data bool

If True, also refresh the data used by the service.

False
wait bool

If True, wait for the refresh operation to complete before returning. If False, return immediately after initiating the refresh operation.

True

Returns:

Name Type Description
dict dict

A response object containing job information and, if wait is True, the updated service object after refreshing.

Source code in src/pixel_client/_sync.py
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
def refresh_arcgis_service(
    self,
    service_type: Literal["Feature", "Image"],
    service_id: int,
    refresh_data: bool = False,
    wait: bool = True,
) -> dict:
    """
    Refresh a specific ArcGIS service, optionally refreshing its data.

    Args:
        service_type: The type of service, either "Feature" or "Image".
        service_id: The ID of the service to refresh.
        refresh_data: If True, also refresh the data used by the service.
        wait: If True, wait for the refresh operation to complete before returning.
             If False, return immediately after initiating the refresh operation.

    Returns:
        dict: A response object containing job information and, if wait is True,
             the updated service object after refreshing.
    """
    return run_sync(
        self._async_client.refresh_arcgis_service(
            service_type, service_id, refresh_data, wait
        )
    )

create_harvest_service

create_harvest_service(
    project_id: int,
    data_collection_id: int,
    create_input: HarvestServiceCreateInput,
) -> dict

Create a new harvest service for a data collection.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection to create the harvest service for.

required
create_input HarvestServiceCreateInput

HarvestServiceCreateInput object containing the service configuration.

required

Returns:

Name Type Description
dict dict

The created harvest service object.

Source code in src/pixel_client/_sync.py
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
def create_harvest_service(
    self,
    project_id: int,
    data_collection_id: int,
    create_input: HarvestServiceCreateInput,
) -> dict:
    """
    Create a new harvest service for a data collection.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection to create the harvest service for.
        create_input: HarvestServiceCreateInput object containing the service configuration.

    Returns:
        dict: The created harvest service object.
    """

    return run_sync(
        self._async_client.create_harvest_service(
            project_id, data_collection_id, create_input
        )
    )

list_harvest_services

list_harvest_services(
    project_id: int,
    data_collection_id: int,
    params: ListParams | None = None,
    **kwargs,
) -> list[dict]

List harvest services for a data collection with optional filtering.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection to list harvest services for.

required
params ListParams | None

Optional ListParams object containing filtering parameters.

None
**kwargs

Alternative way to provide filtering parameters. Ignored if params is provided.

{}

Returns:

Type Description
list[dict]

list[dict]: A list of harvest service objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
def list_harvest_services(
    self,
    project_id: int,
    data_collection_id: int,
    params: ListParams | None = None,
    **kwargs,
) -> list[dict]:
    """
    List harvest services for a data collection with optional filtering.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection to list harvest services for.
        params: Optional ListParams object containing filtering parameters.
        **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

    Returns:
        list[dict]: A list of harvest service objects matching the filter criteria.
    """

    return run_sync(
        self._async_client.list_harvest_services(
            project_id, data_collection_id, params, **kwargs
        )
    )

get_harvest_service

get_harvest_service(
    project_id: int,
    data_collection_id: int,
    service_id: int,
) -> dict

Retrieve a specific harvest service by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the harvest service.

required
service_id int

The ID of the harvest service to retrieve.

required

Returns:

Name Type Description
dict dict

The harvest service object with its details.

Source code in src/pixel_client/_sync.py
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
def get_harvest_service(
    self, project_id: int, data_collection_id: int, service_id: int
) -> dict:
    """
    Retrieve a specific harvest service by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the harvest service.
        service_id: The ID of the harvest service to retrieve.

    Returns:
        dict: The harvest service object with its details.
    """

    return run_sync(
        self._async_client.get_harvest_service(
            project_id, data_collection_id, service_id
        )
    )

update_harvest_service

update_harvest_service(
    project_id: int,
    data_collection_id: int,
    service_id: int,
    update_input: HarvestServiceUpdateInput,
) -> dict

Update an existing harvest service with new values.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the harvest service.

required
service_id int

The ID of the harvest service to update.

required
update_input HarvestServiceUpdateInput

HarvestServiceUpdateInput object containing the fields to update.

required

Returns:

Name Type Description
dict dict

The updated harvest service object.

Source code in src/pixel_client/_sync.py
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
def update_harvest_service(
    self,
    project_id: int,
    data_collection_id: int,
    service_id: int,
    update_input: HarvestServiceUpdateInput,
) -> dict:
    """
    Update an existing harvest service with new values.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the harvest service.
        service_id: The ID of the harvest service to update.
        update_input: HarvestServiceUpdateInput object containing the fields to update.

    Returns:
        dict: The updated harvest service object.
    """

    return run_sync(
        self._async_client.update_harvest_service(
            project_id, data_collection_id, service_id, update_input
        )
    )

delete_harvest_service

delete_harvest_service(
    project_id: int,
    data_collection_id: int,
    service_id: int,
) -> dict

Delete a specific harvest service by its ID.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the harvest service.

required
service_id int

The ID of the harvest service to delete.

required

Returns:

Name Type Description
dict dict

The response confirming deletion.

Source code in src/pixel_client/_sync.py
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
def delete_harvest_service(
    self, project_id: int, data_collection_id: int, service_id: int
) -> dict:
    """
    Delete a specific harvest service by its ID.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the harvest service.
        service_id: The ID of the harvest service to delete.

    Returns:
        dict: The response confirming deletion.
    """
    return run_sync(
        self._async_client.delete_harvest_service(
            project_id, data_collection_id, service_id
        )
    )

get_harvest_service_tasks

get_harvest_service_tasks(
    project_id: int,
    data_collection_id: int,
    service_id: int,
    params: HarvestTaskListParams,
    **kwargs,
) -> list[dict]

Retrieve tasks for a specific harvest service with optional filtering.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the harvest service.

required
service_id int

The ID of the harvest service to retrieve tasks for.

required
params HarvestTaskListParams

HarvestTaskListParams object containing filtering parameters.

required
**kwargs

Alternative way to provide filtering parameters. Ignored if params is provided.

{}

Returns:

Type Description
list[dict]

list[dict]: A list of harvest task objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
def get_harvest_service_tasks(
    self,
    project_id: int,
    data_collection_id: int,
    service_id: int,
    params: HarvestTaskListParams,
    **kwargs,
) -> list[dict]:
    """
    Retrieve tasks for a specific harvest service with optional filtering.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the harvest service.
        service_id: The ID of the harvest service to retrieve tasks for.
        params: HarvestTaskListParams object containing filtering parameters.
        **kwargs: Alternative way to provide filtering parameters. Ignored if params is provided.

    Returns:
        list[dict]: A list of harvest task objects matching the filter criteria.
    """

    return run_sync(
        self._async_client.get_harvest_service_tasks(
            project_id, data_collection_id, service_id, params, **kwargs
        )
    )

start_harvest_service

start_harvest_service(
    project_id: int,
    data_collection_id: int,
    service_id: int,
) -> dict

Start a specific harvest service.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the harvest service.

required
service_id int

The ID of the harvest service to start.

required

Returns:

Name Type Description
dict dict

The response confirming the service has been started.

Source code in src/pixel_client/_sync.py
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
def start_harvest_service(
    self, project_id: int, data_collection_id: int, service_id: int
) -> dict:
    """
    Start a specific harvest service.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the harvest service.
        service_id: The ID of the harvest service to start.

    Returns:
        dict: The response confirming the service has been started.
    """

    return run_sync(
        self._async_client.start_harvest_service(
            project_id, data_collection_id, service_id
        )
    )

stop_harvest_service

stop_harvest_service(
    project_id: int,
    data_collection_id: int,
    service_id: int,
) -> dict

Stop a specific harvest service.

Parameters:

Name Type Description Default
project_id int

The ID of the project containing the data collection.

required
data_collection_id int

The ID of the data collection containing the harvest service.

required
service_id int

The ID of the harvest service to stop.

required

Returns:

Name Type Description
dict dict

The response confirming the service has been stopped.

Source code in src/pixel_client/_sync.py
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
def stop_harvest_service(
    self, project_id: int, data_collection_id: int, service_id: int
) -> dict:
    """
    Stop a specific harvest service.

    Args:
        project_id: The ID of the project containing the data collection.
        data_collection_id: The ID of the data collection containing the harvest service.
        service_id: The ID of the harvest service to stop.

    Returns:
        dict: The response confirming the service has been stopped.
    """

    return run_sync(
        self._async_client.stop_harvest_service(
            project_id, data_collection_id, service_id
        )
    )

create_oidc_user

create_oidc_user(create_input: OIDCUserCreateInput) -> dict

Create a new OIDC user in the system.

Parameters:

Name Type Description Default
create_input OIDCUserCreateInput

OIDCUserCreateInput object containing the user information.

required

Returns:

Name Type Description
dict dict

The created user object.

Note

This method handles the extraction of the password from the SecretStr field in the create_input object.

Source code in src/pixel_client/_sync.py
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
def create_oidc_user(self, create_input: OIDCUserCreateInput) -> dict:
    """
    Create a new OIDC user in the system.

    Args:
        create_input: OIDCUserCreateInput object containing the user information.

    Returns:
        dict: The created user object.

    Note:
        This method handles the extraction of the password from the SecretStr field
        in the create_input object.
    """

    return run_sync(self._async_client.create_oidc_user(create_input))

update_oidc_user

update_oidc_user(
    user_id: int, update_input: OIDCUserUpdateInput
) -> dict

Update an existing OIDC user with new values.

Parameters:

Name Type Description Default
user_id int

The ID of the user to update.

required
update_input OIDCUserUpdateInput

OIDCUserUpdateInput object containing the fields to update.

required

Returns:

Name Type Description
dict dict

The updated user object.

Note

This method handles the extraction of the password from the SecretStr field in the update_input object if provided.

Source code in src/pixel_client/_sync.py
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
def update_oidc_user(self, user_id: int, update_input: OIDCUserUpdateInput) -> dict:
    """
    Update an existing OIDC user with new values.

    Args:
        user_id: The ID of the user to update.
        update_input: OIDCUserUpdateInput object containing the fields to update.

    Returns:
        dict: The updated user object.

    Note:
        This method handles the extraction of the password from the SecretStr field
        in the update_input object if provided.
    """

    return run_sync(self._async_client.update_oidc_user(user_id, update_input))

list_attachments

list_attachments(
    resource_type: AttachmentResourceType,
    resource_id: int,
    status: Literal["Pending", "Completed"] | None = None,
) -> list[dict]

List attachments for a specific resource with optional status filtering.

Parameters:

Name Type Description Default
resource_type AttachmentResourceType

The type of resource the attachments belong to.

required
resource_id int

The ID of the resource to list attachments for.

required
status Literal['Pending', 'Completed'] | None

Optional filter for attachment status, either "Pending" or "Completed".

None

Returns:

Type Description
list[dict]

list[dict]: A list of attachment objects matching the filter criteria.

Source code in src/pixel_client/_sync.py
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
def list_attachments(
    self,
    resource_type: AttachmentResourceType,
    resource_id: int,
    status: Literal["Pending", "Completed"] | None = None,
) -> list[dict]:
    """
    List attachments for a specific resource with optional status filtering.

    Args:
        resource_type: The type of resource the attachments belong to.
        resource_id: The ID of the resource to list attachments for.
        status: Optional filter for attachment status, either "Pending" or "Completed".

    Returns:
        list[dict]: A list of attachment objects matching the filter criteria.
    """

    return run_sync(
        self._async_client.list_attachments(resource_type, resource_id, status)
    )

add_attachments

add_attachments(
    resource_type: AttachmentResourceType,
    resource_id: int,
    files: list[PixelAttachmentUpload | Path]
    | list[Path]
    | list[PixelAttachmentUpload],
) -> list[dict]

Add one or more file attachments to a resource.

Parameters:

Name Type Description Default
resource_type AttachmentResourceType

The type of resource to attach files to.

required
resource_id int

The ID of the resource to attach files to.

required
files list[PixelAttachmentUpload | Path] | list[Path] | list[PixelAttachmentUpload]

List of files to attach, which can be Path objects or PixelAttachmentUpload objects.

required

Returns:

Type Description
list[dict]

list[dict]: A list of the created attachment objects.

Raises:

Type Description
AssertionError

If any attachment names are not unique.

Source code in src/pixel_client/_sync.py
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
def add_attachments(
    self,
    resource_type: AttachmentResourceType,
    resource_id: int,
    files: list[PixelAttachmentUpload | Path]
    | list[Path]
    | list[PixelAttachmentUpload],
) -> list[dict]:
    """
    Add one or more file attachments to a resource.

    Args:
        resource_type: The type of resource to attach files to.
        resource_id: The ID of the resource to attach files to.
        files: List of files to attach, which can be Path objects or PixelAttachmentUpload objects.

    Returns:
        list[dict]: A list of the created attachment objects.

    Raises:
        AssertionError: If any attachment names are not unique.
    """

    return run_sync(
        self._async_client.add_attachments(resource_type, resource_id, files)
    )

move_attachment

move_attachment(
    resource_type: AttachmentResourceType,
    resource_id: int,
    attachment_id: int,
    new_resource_type: AttachmentResourceType,
    new_resource_id: int,
) -> dict

Move an attachment from one resource to another.

Parameters:

Name Type Description Default
resource_type AttachmentResourceType

The current resource type of the attachment.

required
resource_id int

The current resource ID the attachment belongs to.

required
attachment_id int

The ID of the attachment to move.

required
new_resource_type AttachmentResourceType

The target resource type to move the attachment to.

required
new_resource_id int

The target resource ID to move the attachment to.

required

Returns:

Name Type Description
dict dict

The updated attachment object.

Source code in src/pixel_client/_sync.py
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
def move_attachment(
    self,
    resource_type: AttachmentResourceType,
    resource_id: int,
    attachment_id: int,
    new_resource_type: AttachmentResourceType,
    new_resource_id: int,
) -> dict:
    """
    Move an attachment from one resource to another.

    Args:
        resource_type: The current resource type of the attachment.
        resource_id: The current resource ID the attachment belongs to.
        attachment_id: The ID of the attachment to move.
        new_resource_type: The target resource type to move the attachment to.
        new_resource_id: The target resource ID to move the attachment to.

    Returns:
        dict: The updated attachment object.
    """

    return run_sync(
        self._async_client.move_attachment(
            resource_type,
            resource_id,
            attachment_id,
            new_resource_type,
            new_resource_id,
        )
    )

delete_attachment

delete_attachment(
    resource_type: AttachmentResourceType,
    resource_id: int,
    attachment_id: int,
) -> dict

Delete a specific attachment from a resource.

Parameters:

Name Type Description Default
resource_type AttachmentResourceType

The resource type the attachment belongs to.

required
resource_id int

The resource ID the attachment belongs to.

required
attachment_id int

The ID of the attachment to delete.

required

Returns:

Name Type Description
dict dict

The response confirming deletion.

Source code in src/pixel_client/_sync.py
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
def delete_attachment(
    self,
    resource_type: AttachmentResourceType,
    resource_id: int,
    attachment_id: int,
) -> dict:
    """
    Delete a specific attachment from a resource.

    Args:
        resource_type: The resource type the attachment belongs to.
        resource_id: The resource ID the attachment belongs to.
        attachment_id: The ID of the attachment to delete.

    Returns:
        dict: The response confirming deletion.
    """

    return run_sync(
        self._async_client.delete_attachment(
            resource_type, resource_id, attachment_id
        )
    )

search_info

search_info(on: SearchOn) -> dict

Retrieve search metadata for a specific resource type.

Parameters:

Name Type Description Default
on SearchOn

The resource type to retrieve search metadata for.

required
Source code in src/pixel_client/_sync.py
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
def search_info(self, on: SearchOn) -> dict:
    """
    Retrieve search metadata for a specific resource type.

    Args:
        on: The resource type to retrieve search metadata for.
    Returns:
        dict: A dictionary containing output fields, filterable fields and search capabilities.
    """
    return run_sync(self._async_client.search_info(on))

search

search(search_query: dict | SearchQuery) -> SearchResults

Perform a search across various resources.

Parameters:

Name Type Description Default
search_query dict | SearchQuery

SearchQuery object or dict containing the search parameters.

required
Source code in src/pixel_client/_sync.py
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
def search(self, search_query: dict | SearchQuery) -> SearchResults:
    """
    Perform a search across various resources.

    Args:
        search_query: SearchQuery object or dict containing the search parameters.
    Returns:
        SearchResults: The search results dictionary.
    """
    return run_sync(self._async_client.search(search_query))
paginate_search(
    search_query: dict | SearchQuery, page_size: int
) -> Iterator[dict]

Perform a paginated search across various resources.

Parameters:

Name Type Description Default
search_query dict | SearchQuery

SearchQuery object or dict containing the search parameters.

required
page_size int

Number of results to retrieve per page.

required

Yields:

Name Type Description
dict dict

Individual search result items.

Source code in src/pixel_client/_sync.py
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
def paginate_search(
    self, search_query: dict | SearchQuery, page_size: int
) -> Iterator[dict]:
    """
    Perform a paginated search across various resources.

    Args:
        search_query: SearchQuery object or dict containing the search parameters.
        page_size: Number of results to retrieve per page.

    Yields:
        dict: Individual search result items.
    """
    return iter_over_async(
        self._async_client.paginate_search(
            search_query,
            page_size,
        )
    )