Skip to content

Developer Scripts

pulver edited this page Jun 8, 2026 · 1 revision

Developer Scripts

This repository includes many scripts for examples, imports, exports, entity creation, and debugging. Most scripts assume local Orion at http://localhost:1026/v2/entities or contain hard-coded development endpoints. Review and edit endpoints before running them in a deployment.

Flask Helpers

Location:

AGRIDS/flask

Important groups:

Group Scripts
Orion create helpers orion_add_vineyard.py, orion_add_block.py, orion_add_block_area.py, orion_add_vinerow.py, orion_add_vine.py, orion_add_point_feature.py, orion_add_line_feature.py, orion_add_polygon_feature.py, orion_add_image.py
Orion query/delete helpers orion_query_vines_in_block.py, orion_query_vines_in_vine_row.py, orion_delete_entity.py
Import conversion csv_upload_to_geojson.py, csv_rows_vines_upload_to_geojson.py, geojson_to_orion.py, mapbox_to_orion.py, mapbox_to_orion_csv.py, mapvit_to_orion.py
Export conversion export_to_geojson.py, export_to_antobot_xml.py, export_geojson_to_antobot_xml.py, export_to_pdf.py, export_to_kml.py, export_to_topological_map.py
Geometry helpers line_to_polygon.py, extend_line.py, interpolate_points.py, create_enclosing_polygons.py, generate_topological_map.py, get_padded_bounding_box.py, line_length.py

Orion Scripts

Location:

AGRIDS/orion/python_scripts

Useful groups:

Group Scripts
Add data orion_add_all_vineyard_data.py, orion_add_vineyard.py, orion_add_block.py, orion_add_vinerow.py, orion_add_vine.py, orion_add_image.py
Update data orion_update_vine.py, orion_update_block.py, orion_update_vine_row.py, orion_update_vineyard.py, orion_update_all_entities.py, orion_update_all_blocks.py, orion_update_all_vine_rows.py
Delete data orion_delete_entity.py, orion_delete_all_entities.py
Query data orion_query_all_blocks.py, orion_query_images_in_vine_row.py, orion_query_vines_in_block.py, orion_find_entities_without_property.py
Subscriptions orion_new_subscription.py, orion_new_subscription_one_entity.py, orion_new_subscription_all_data.py, orion_create_draco_subscription.py, orion_check_subscription_status.py, orion_delete_all_subscriptions.py, notification_listener.py, cygnus_notification_example.py
History access mongodb_access_vine_data_by_time.py, mongodb_access_multiple_vine_data_by_time.py, mongodb_access_vine_data_last_values.py, comet_access_data.py, comet_access_data2.py
MinIO minio_file_uploader.py, minio_download_file.py, minio_list_files.py, upload_data_orion_minio.py

Zenoh and MinIO Scripts

Location:

AGRIDS/zenoh/minio/python_scripts

Useful groups:

Group Scripts
Publish zenoh_publish_image.py, zenoh_publish_ros2_image.py
Subscribe/store zenoh_subscribe_store_image.py, zenoh_subscribe_store_image_orion.py, zenoh_subscribe_save_jpg_image.py, zenoh_subscribe_image_print.py
Retrieve/query zenoh_retrieve_image.py, zenoh_retrieve_vine.py, zenoh_query_vines_in_row.py
Add examples zenoh_add_data.py, zenoh_add_vine.py, orion_add_image.py, zenoh_store_image.py

Before Running Scripts

Check each script for:

  • Orion endpoint.
  • MinIO server and credentials.
  • Zenoh host, port, and topic names.
  • Vineyard, block, row, vine, and file IDs.
  • Whether it creates, updates, or deletes data.

For production or shared deployments, avoid running delete/update scripts until you have a backup or a clear rollback path.

Clone this wiki locally