Use this file to discover all available pages before exploring further.
What this builds. A trivial pipeline used as a vehicle for the sharing surface: pipeline.share(user_id=...), pipeline.share(org_id=...), pipeline.publish(...), pipeline.unpublish(...).
You’ll end up with. A deployed pipeline shared with one user (editor) and one org (viewer), briefly published to the marketplace, then unpublished.
from vectorshift.pipeline import Pipeline# Create a simple pipeline to demonstrate sharing/publishingPIPELINE_NAME = "share_publish_example"try: pipeline = Pipeline.fetch(name=PIPELINE_NAME) print(f"Pipeline fetched: id={pipeline.id}, branch_id={pipeline.branch_id}")except Exception as e: print(f"Error fetching pipeline: {e}") pipeline = Pipeline.new(name=PIPELINE_NAME) print(f"Pipeline created: id={pipeline.id}, branch_id={pipeline.branch_id}")inp = pipeline.add(name="input_0", id="input_0").input(input_type="string")out = pipeline.add(name="output_0", id="output_0").output( output_type="string", value=inp.text)pipeline.save(deploy=True)print(f"Pipeline ID: {pipeline.id}")# Share with a user by user_idtry: pipeline.share(user_id="your-user-id-here", role="editor", name="User Name") print("Shared with user as editor")except Exception as e: print(f"Failed to share with user: {e}")# Share with an organization by org_idtry: pipeline.share(org_id="your-org-id-here", role="viewer", name="Team Name") print("Shared with org as viewer")except Exception as e: print(f"Failed to share with org: {e}")# Unshare a user# pipeline.unshare(user_id="user_abc123")# print("Unshared user")# Unshare an org# pipeline.unshare(org_id="org_xyz456")# print("Unshared org")# Publish to marketplacepub = pipeline.publish( title="Share Publish Example", description="A demo pipeline for sharing and publishing", tags=["demo", "example"],)print(f"Published: marketplace_id={pub['id']}")# Unpublishpipeline.unpublish(marketplace_id=pub["id"])print("Unpublished")
Pipeline created: id=..., branch_id=...Pipeline ID: ...Failed to share with user: ...Failed to share with org: ...Published: marketplace_id=...Unpublished
The two share(...) calls will fail with the placeholder ids — substitute real user_id / org_id strings. The publish/unpublish path needs no external ids.