Omniverse Client Library Python API

omni.client

class omni.client.AccessFlags

Members:

READ : Can read

WRITE : Can write

ADMIN : Can change ACLs

property name

handle) -> str

Type

(self

class omni.client.ChannelEvent

Members:

ERROR : Error.

MESSAGE : Someone sent a message.

HELLO : You joined a channel that someone else was already in, and they said hello.

JOIN : Someone joined.

LEFT : Someone left.

DELETED : Someone deleted the channel or changed ACLs so you no longer have access.

property name

handle) -> str

Type

(self

class omni.client.ConnectionStatus

Members:

CONNECTING : Attempting to connect

CONNECTED : Successfully connected

CONNECT_ERROR : Error trying to connect

DISCONNECTED : Disconnected

property name

handle) -> str

Type

(self

class omni.client.Content

Object to hold file content.

Use python memoryview to access it. For example:

_, content = await omni.client.read_file_async("omniverse://ov-sandbox/some/file.txt")
print(memoryview(content).tobytes())
class omni.client.CopyBehavior

Members:

ERROR_IF_EXISTS : Fails to copy with an error if the destination already exists

OVERWRITE : Overwrites any files on copy

property name

handle) -> str

Type

(self

class omni.client.FileStatus

Members:

READING : Reading

WRITING : Writing

COPYING : Copying

MOVING : Moving

DELETING : Deleting

SENDING_UPDATE : Sending Live Update

RECEIVED_UPDATE : Received Live Update

LISTING : Listing

STATING : Stating

property name

handle) -> str

Type

(self

class omni.client.ItemFlags

Members:

READABLE_FILE : You can call read_file on this. note: ACLs may still prevent you from reading it

WRITEABLE_FILE : You can call write_file on this. note: ACLs may still prevent you from writing it

CAN_HAVE_CHILDREN : This thing can contain other things (a folder-like thing)

DOES_NOT_HAVE_CHILDRENThis thing does not have any children. The lack of this flag does not mean it does have children!

Sometimes we are not sure if it has children until you attempt to list the children. This is only intended to be used for UI elements to hide the ‘expand’ button if we are sure it does not have any children.

IS_MOUNT : This thing is the root of a mount point

IS_INSIDE_MOUNT : This thing is located inside a mounted folder

CAN_LIVE_UPDATE : This thing supports live updates

IS_OMNI_OBJECT : This thing is in omni-object format. You must use a special API to read/write it

IS_CHANNEL : This thing is a channel. You can call join_channel on it

IS_CHECKPOINTED : This item is checkpointed (meaning you can revert to it)

property name

handle) -> str

Type

(self

class omni.client.ListEvent

Members:

UNKNOWN

CREATED

UPDATED

DELETED

METADATA

LOCKED

UNLOCKED

property name

handle) -> str

Type

(self

class omni.client.LogLevel

Members:

DEBUG : Extra chatty

VERBOSE : Chatty

INFO : Not a problem

WARNING : Potential problem

ERROR : Definite problem

property name

handle) -> str

Type

(self

class omni.client.Request

Generic request object. Can be used to stop request before completing.

is_finished(self: omni.client._omniclient.Request)bool
stop(self: omni.client._omniclient.Request)None
wait(self: omni.client._omniclient.Request)None
class omni.client.Result

Members:

OK

OK_LATEST

OK_NOT_YET_FOUND

ERROR

ERROR_CONNECTION

ERROR_NOT_SUPPORTED

ERROR_ACCESS_DENIED

ERROR_NOT_FOUND

ERROR_BAD_VERSION

ERROR_ALREADY_EXISTS

ERROR_SOURCE_IS_DEST

ERROR_ACCESS_LOST

ERROR_LOCKED

ERROR_BAD_REQUEST

property name

handle) -> str

Type

(self

omni.client.add_bookmark(name: str, url: str)None

Add a bookmark.

omni.client.add_user_to_group(url: str, user: str, group: str)omni.client.Result

Deprecated: Use omni.client.add_user_to_group_async() or omni.client.add_user_to_group_with_callback() instead.

async omni.client.add_user_to_group_async(url: str, user: str, group: str)omni.client.Result

Asynchronously Add a user to a group

See: omni.client.add_user_to_group_with_callback()

omni.client.add_user_to_group_with_callback(url: str, user: str, group: str, callback: Callable[[omni.client.Result], None])omni.client.Request

Add a user to a group

omni.client.authentication_cancel(auth_handle: int)None

Cancel the current authentication attempt

omni.client.break_url(url: str)omni.client.Url

Break a URL into it’s component parts

omni.client.break_url_absolute(url: str)omni.client.Url
Similar to break_url except it assumes the URL is either an absolute URL (which starts with a scheme:)

or is a raw file path. This mostly affects how it handles percent-encoded paths.

omni.client.combine_urls(base_url: str, other_url: str)str

Returns a URL which is a combination of the base_url and other_url

omni.client.combine_with_base_url(other_url: str)str

This calls omni.client.combine_urls() with the URL on top of the base url stack.

omni.client.copy(src_url: str, dst_url: str, behavior: omni.client.CopyBehavior = CopyBehavior.ERROR_IF_EXISTS, message: str = '')omni.client.Result

Deprecated: Use omni.client.copy_async() or omni.client.copy_with_callback() instead.

async omni.client.copy_async(src_url: str, dst_url: str, behavior: omni.client.CopyBehavior = CopyBehavior.ERROR_IF_EXISTS, message: str = '')omni.client.Result

Asynchronously Copy an item from src_url to dst_url

See: omni.client.copy_with_callback()

omni.client.copy_with_callback(src_url: str, dst_url: str, callback: Callable[[omni.client.Result], None], behavior: omni.client.CopyBehavior = CopyBehavior.ERROR_IF_EXISTS, message: str = None)omni.client.Request

Copy a thing from src_url to dst_url.

The thing can be anything that supports copying (files, folders, etc..) If both src and dst are on the same server, this is done on the server Otherwise the file is first downloaded from ‘src’ then uploaded to ‘dst’.

Destination folders will be created as needed

Parameters
  • src_url – Source url.

  • dst_url – Destination url.

  • callback – Callback to be called with the result.

  • behavior – behavior if the destination exists.

  • message – Message to apply to atomic checkpoint of destination url.

Returns

Request object.

omni.client.create_checkpoint(url: str, comment: str, force: bool = False)Tuple[omni.client.Result, str]

Deprecated: Use omni.client.create_checkpoint_async() or omni.client.create_checkpoint_with_callback() instead.

async omni.client.create_checkpoint_async(url: str, comment: str, force: bool = False)Tuple[omni.client.Result, str]

Asynchronously Create a checkpoint of an item

See: omni.client.create_checkpoint_with_callback()

omni.client.create_checkpoint_with_callback(url: str, comment: str, force: bool = False, callback: Callable[[omni.client.Result, str], None])omni.client.Request

Create a checkpoint.

Parameters
  • url – URL of file to create a checkpoint for.

  • comment – Comment to associate with the checkpoint

  • force – Set to true to force creating a checkpoint even if there are no changes

  • callback – Callback to be called with the result.

Returns

Request object.

omni.client.create_folder(url: str)omni.client.Result

Deprecated: Use omni.client.create_folder_async() or omni.client.create_folder_with_callback() instead.

async omni.client.create_folder_async(url: str)omni.client.Result

Asynchronously Create a folder

See: omni.client.create_folder_with_callback()

omni.client.create_folder_with_callback(url: str, callback: Callable[[omni.client.Result], None])omni.client.Request

Create a folder.

Parameters
  • url – URL of folder to create.

  • callback – Callback to be called with the result.

Returns

Request object.

omni.client.create_group(url: str, group: str)omni.client.Result

Deprecated: Use omni.client.create_group_async() or omni.client.create_group_with_callback() instead.

async omni.client.create_group_async(url: str, group: str)omni.client.Result

Asynchronously Create a group

See: omni.client.create_group_with_callback()

omni.client.create_group_with_callback(url: str, group: str, callback: Callable[[omni.client.Result], None])omni.client.Request

Create a group

omni.client.delete(url: str)omni.client.Result

Deprecated: Use omni.client.delete_async() or omni.client.delete_with_callback() instead.

async omni.client.delete_async(url: str)omni.client.Result

Asynchronously Delete an item

See: omni.client.delete_with_callback()

omni.client.delete_with_callback(url: str, callback: Callable[[omni.client.Result], None])omni.client.Request

Delete something (file, folder, mount, live object, channel etc..).

Parameters
  • url – URL of item to delete.

  • callback – Callback to be called with the result.

Returns

Request object.

omni.client.get_acls(url: str)Tuple[omni.client.Result, List[omni.client.AclEntry]]

Deprecated: Use omni.client.get_acls_async() or omni.client.get_acls_with_callback() instead.

async omni.client.get_acls_async(url: str)Tuple[omni.client.Result, List[omni.client.AclEntry]]

Asynchronously Get the ACLs for an item

See: omni.client.get_acls_with_callback()

omni.client.get_acls_with_callback(url: str, callback: Callable[[omni.client.Result, list], None])omni.client.Request

Get the ACL’s on a folder/file.

Parameters
  • url – URL of item to get the ACLs for.

  • callback – Callback to be called with the result and current ACLs.

Returns

Request object.

omni.client.get_branch_and_checkpoint_from_query(query: str)tuple

Extract the branch and checkpoint from a query parameter

omni.client.get_group_users(url: str, group: str)Tuple[omni.client.Result, List[str]]

Deprecated: Use omni.client.get_group_users_async() or omni.client.get_group_users_with_callback() instead.

async omni.client.get_group_users_async(url: str, group: str)Tuple[omni.client.Result, List[str]]

Asynchronously Get a list of all users in a group

See: omni.client.get_group_users_with_callback()

omni.client.get_group_users_with_callback(url: str, group: str, callback: Callable[[omni.client.Result, list], None])omni.client.Request

Get a list of users in a group

omni.client.get_groups(url: str)Tuple[omni.client.Result, List[str]]

Deprecated: Use omni.client.get_groups_async() or omni.client.get_groups_with_callback() instead.

async omni.client.get_groups_async(url: str)Tuple[omni.client.Result, List[str]]

Asynchronously Get a list of all groups

See: omni.client.get_groups_with_callback()

omni.client.get_groups_with_callback(url: str, callback: Callable[[omni.client.Result, list], None])omni.client.Request

Get a list of all groups

omni.client.get_local_file(url: str, download: bool)Tuple[omni.client.Result, str]

Deprecated: Use omni.client.get_local_file_async() or omni.client.get_local_file_with_callback() instead.

async omni.client.get_local_file_async(url: str, download: bool)Tuple[omni.client.Result, str]

Asynchronously Get local file path from a URL

See: omni.client.get_local_file_with_callback()

omni.client.get_local_file_with_callback(url: str, download: bool, callback: Callable[[omni.client.Result, str], None])omni.client.Request

Get local file path for remote file.

Parameters
  • url – URL of file to get the local path for.

  • download – Pass false to get the local filename without downloading the file.

  • callback – Callback to be called with the result.

Returns

Request object.

omni.client.get_server_info(url: str)Tuple[omni.client.Result, omni.client.ServerInfo]

Deprecated: Use omni.client.get_server_info_async() or omni.client.get_server_info_with_callback() instead.

async omni.client.get_server_info_async(url: str)Tuple[omni.client.Result, omni.client.ServerInfo]

Asynchronously Get Server Info

See: omni.client.get_server_info_with_callback()

omni.client.get_server_info_with_callback(url: str, callback: Callable[[omni.client.Result, omni.client.ServerInfo], None])omni.client.Request
omni.client.get_user_groups(url: str, user: str)Tuple[omni.client.Result, List[str]]

Deprecated: Use omni.client.get_user_groups_async() or omni.client.get_user_groups_with_callback() instead.

async omni.client.get_user_groups_async(url: str, user: str)Tuple[omni.client.Result, List[str]]

Asynchronously Get a list of groups the user is in

See: omni.client.get_user_groups_with_callback()

omni.client.get_user_groups_with_callback(url: str, user: str, callback: Callable[[omni.client.Result, list], None])omni.client.Request

Retrieve the groups a user is in

omni.client.get_users(url: str)Tuple[omni.client.Result, List[str]]

Deprecated: Use omni.client.get_users_async() or omni.client.get_users_with_callback() instead.

async omni.client.get_users_async(url: str)Tuple[omni.client.Result, List[str]]

Asynchronously Get a list of all users

See: omni.client.get_users_with_callback()

omni.client.get_users_with_callback(url: str, callback: Callable[[omni.client.Result, list], None])omni.client.Request

Get a list of all users

omni.client.get_version()str

Get the version of the client library being used.

Returns

Returns a human readable version string.

omni.client.initialize(version: int = 563010082963456)bool

Initialize the client library.

Returns

False if the library failed to initialize.

omni.client.join_channel_with_callback(url: str, callback: Callable[[omni.client.Result, omni.client.ChannelEvent, str, omni.client.Content], None])omni.client.Request

Join a channel.

Parameters
  • url – URL of of channel to join.

  • callback – Callback to be called with the result.

Returns

Request object.

omni.client.list(url: str)Tuple[omni.client.Result, Tuple[omni.client.ListEntry]]

Deprecated: Use omni.client.list_async() or omni.client.list_with_callback() instead.

async omni.client.list_async(url: str)Tuple[omni.client.Result, Tuple[omni.client.ListEntry]]

Asynchronously List contents of a folder

See: omni.client.list_with_callback()

omni.client.list_bookmarks_with_callback(callback: Callable[[dict], None])omni.client.Subscription

Retrieve a list of bookmarks. The callback is called any time the list changes (by this application or any other).

omni.client.list_checkpoints(url: str)Tuple[omni.client.Result, Tuple[omni.client.ListEntry]]

Deprecated: Use omni.client.list_checkpoints_async() or omni.client.list_checkpoints_with_callback() instead.

async omni.client.list_checkpoints_async(url: str)Tuple[omni.client.Result, Tuple[omni.client.ListEntry]]

Asynchronously List the checkpoints of an item

See: omni.client.list_checkpoints_with_callback()

omni.client.list_checkpoints_with_callback(url: str, callback: Callable[[omni.client.Result, tuple], None])omni.client.Request

List checkpoints.

Parameters
  • url – URL of file to list the checkpoints of.

  • callback – Callback to be called with the result.

Returns

Request object.

omni.client.list_subscribe_with_callback(url: str, list_callback: Callable[[omni.client.Result, tuple], None], subscribe_callback: Callable[[omni.client.Result, omni.client.ListEvent, omni.client.ListEntry], None])omni.client.Subscription

Subscribe to change notifications for a url.

If ‘url’ is a file, you will only receive information about that file. If ‘url’ is a folder, you will additionally receive information about the files inside it. ‘list_callback is called once with the initial list,then ‘subscribe_callback’ may be called multiple times after that as items change.

Parameters
  • url – URL of folder to subscribe to.

  • list_callback – Callback to be called once with the list.

  • subscribe_callback – Callback to be called when changes happen.

Returns

Subscrption object.

omni.client.list_with_callback(url: str, callback: Callable[[omni.client.Result, tuple], None])omni.client.Request

List content of a folder.

Parameters
  • url – URL of a folder to list the contents of.

  • callback – Callback to be called with the results.

Returns

Request object.

omni.client.live_get_latest_server_time(url: str)int

Returns the server timestamp of the most recently received message (0 if no messages have been received).

omni.client.live_process()None

Call this to process live updates received from the server.

omni.client.live_process_up_to(url: str, server_time: int)None

Same as omni.client.live_process() but you can specify a server time to stop processing updates.

Parameters
  • url – URL of server to process updates for. Only the “prefix” such as “omniverse://content.ov.nvidia.com” is needed, the path is ignored.

  • server_time – The server time to stop processing updates.

omni.client.live_set_queued_callback(callback: Callable[], None])None

Set a function which is called any time we receive a live update.

This is intended to notify you that you should call live_process. DO NOT call omni.client.live_process() from within the callback function!

omni.client.live_wait_for_pending_updates()None

Call this to wait for all pending live updates to complete.

omni.client.lock_with_callback(url: str, callback: Callable[[omni.client.Result], None])omni.client.Request

Lock a URL so only this client can modify it.

Parameters

url – URL of file to lock.

omni.client.make_file_url(path: str)str

Returns a “file:” URL for the given path

omni.client.make_printable(url: str)str

Returns a url which is safe for printing (no invalid UTF-8 sequences or ASCII control characters)

omni.client.make_query_from_branch_and_checkpoint(branch: str, checkpoint: int)str

Return a query parameter that can be used to reference this branch and checkpoint

omni.client.make_relative_url(base_url: str, other_url: str)str

Returns a url which will result in other_url, when combined with base_url

omni.client.make_url(scheme: str = None, user: str = None, host: str = None, port: str = None, path: str = None, query: str = None, fragment: str = None)str

Compose a URL from the provided parts

omni.client.move(src_url: str, dst_url: str, behavior: omni.client.CopyBehavior = CopyBehavior.ERROR_IF_EXISTS, message: str = '')Tuple[omni.client.Result, bool]

Deprecated: Use omni.client.move_async() or omni.client.move_with_callback() instead.

async omni.client.move_async(src_url: str, dst_url: str, behavior: omni.client.CopyBehavior = CopyBehavior.ERROR_IF_EXISTS, message: str = '')Tuple[omni.client.Result, bool]

Asynchronously Move an item from src_url to dst_url

See: omni.client.move_with_callback()

omni.client.move_with_callback(src_url: str, dst_url: str, callback: Callable[[omni.client.Result, bool], None], behavior: omni.client.CopyBehavior = CopyBehavior.ERROR_IF_EXISTS, message: str = None)omni.client.Request

Move a thing from src_url to dst_url.

If both src and dst are on the same server, this is done on the server. Otherwise, it is first copied from srcUrl to dstUrl, then deleted from dstUrl Note it is possible for the copy to succeed and the delete to fail. In this case the result will be the error code from the delete but ‘copied’ will be true.

If the result is ‘Ok’ but ‘copied’ is false, that means the move was done entirely on the server, so no local copy had to be made.

Destination folders will be created as needed

Parameters
  • src_url – Source url.

  • dst_url – Destination url.

  • callback – Callback to be called with the result.

  • behavior – behavior if the destination exists.

  • message – Message to apply to atomic checkpoint of destination url.

Returns

Request object.

omni.client.normalize_url(url: str)str

Normalize a URL by parsing it then recomposing it

omni.client.pop_base_url(url: str)bool

Pop a URL off the base stack

omni.client.push_base_url(url: str)None

Push a URL onto the base stack, which is used with omni.client.combine_with_base_url().

omni.client.read_file(url: str)Tuple[omni.client.Result, str, omni.client.Content]

Deprecated: Use omni.client.read_file_async() or omni.client.read_file_with_callback() instead.

async omni.client.read_file_async(url: str)Tuple[omni.client.Result, str, omni.client.Content]

Asynchronously Read a file

See: omni.client.read_file_with_callback()

omni.client.read_file_with_callback(url: str, callback: Callable[[omni.client.Result, str, omni.client.Content], None])omni.client.Request

Read a file.

Parameters
  • url – URL of file to read.

  • callback – Callback to be called with the result.

Returns

Request object.

omni.client.reconnect(url: str)None

Reconnect to a URL after a failure.

The client library doesn’t automatically reconnect after failures.

This triggers a background reconnect attempt, you can call a function such as omni.client.stat() or use omni.client.register_connection_status_callback() to determine if the reconnect attempt was successful.

Parameters

url – Attempt to connect to this url

omni.client.register_authorize_callback(callback: Callable[[str], object])omni.client.Subscription

Register an authorize callback.

The callback receives the URL prefix (such as “scheme://server:port”) as a parameter and should return either:

None or False: Continue to the next authorize callback (or default authorization method) True: Abort the connection String: A token (usually the auth_token provided by get_server_info) (String, String): A username and password

Parameters

callback – Callback to be called to provide authentication information.

Returns

Subscription Object. Callback will be unregistered once subcription is released.

omni.client.register_connection_status_callback(callback: Callable[[str, omni.client.ConnectionStatus], None])omni.client.Subscription

Register connection status callback.

Parameters

callback – Callback to be called with the status.

Returns

Subscription Object. Callback will be unregistered once subcription is released.

omni.client.register_file_status_callback(callback: Callable[[str, omni.client.FileStatus, int], None])omni.client.Subscription

Register file status callback.

Parameters

callback – Callback to be called with the status.

Returns

Subscription Object. Callback will be unregistered once subcription is released.

omni.client.remove_bookmark(name: str)None

Remove a bookmark.

omni.client.remove_group(url: str, group: str)Tuple[omni.client.Result, int]

Deprecated: Use omni.client.remove_group_async() or omni.client.remove_group_with_callback() instead.

async omni.client.remove_group_async(url: str, group: str)Tuple[omni.client.Result, int]

Asynchronously Remove a group

See: omni.client.remove_group_with_callback()

omni.client.remove_group_with_callback(url: str, group: str, callback: Callable[[omni.client.Result, int], None])omni.client.Request

Remove a group

omni.client.remove_user_from_group(url: str, user: str, group: str)omni.client.Result

Deprecated: Use omni.client.remove_user_from_group_async() or omni.client.remove_user_from_group_with_callback() instead.

async omni.client.remove_user_from_group_async(url: str, user: str, group: str)omni.client.Result

Asynchronously Remove a user from a group

See: omni.client.remove_user_from_group_with_callback()

omni.client.remove_user_from_group_with_callback(url: str, user: str, group: str, callback: Callable[[omni.client.Result], None])omni.client.Request

Remove a user from a group

omni.client.rename_group(url: str, group: str, new_group: str)omni.client.Result

Deprecated: Use omni.client.rename_group_async() or omni.client.rename_group_with_callback() instead.

async omni.client.rename_group_async(url: str, group: str, new_group: str)omni.client.Result

Asynchronously Rename a group

See: omni.client.rename_group_with_callback()

omni.client.rename_group_with_callback(url: str, group: str, new_group: str, callback: Callable[[omni.client.Result], None])omni.client.Request

Rename a group

omni.client.send_message(join_request_id: int, content: bytes)omni.client.Result

Deprecated: Use omni.client.send_message_async() or omni.client.send_message_with_callback() instead.

async omni.client.send_message_async(join_request_id: int, content: bytes)omni.client.Result

Asynchronously Send a message to a channel

See: omni.client.send_message_with_callback()

omni.client.send_message_with_callback(join_request_id: int, content: buffer, callback: Callable[[omni.client.Result], None])omni.client.Request

Send a message to a channel.

Parameters
Returns

Request object.

omni.client.set_acls(url: str, acls: List[omni.client.AclEntry])omni.client.Result

Deprecated: Use omni.client.set_acls_async() or omni.client.set_acls_with_callback() instead.

async omni.client.set_acls_async(url: str, acls: List[omni.client.AclEntry])omni.client.Result

Asynchronously Set the ACLs for an item

See: omni.client.set_acls_with_callback()

omni.client.set_acls_with_callback(url: str, acls: list, callback: Callable[[omni.client.Result], None])omni.client.Request

Set the ACL’s on a folder/file.

Parameters
  • url – URL of item to set the ACLs on.

  • acls – the complete new set of ACLs to put on this file/folder.

  • callback – Callback to be called with the result and current ACLs.

Returns

Request object.

omni.client.set_authentication_message_box_callback(callback: Callable[[bool, str, int], None])None

Set an authentication message box callback.

The callback is called when authentication requires opening a web browser to complete sign-in.

The intention is the application should show a dialog box letting the user know that a browser window has opened and to complete signing in using the web browser.

The callback receives:
  1. A bool indicating if the dialog should be shown (true) or hidden (false)

  2. A string indicating the host name that the authentication is for

  3. An integer handle that should be passed to “Cancel”

You should provide a “Cancel” button and call cancel_authentication if the user presses it.

You should call this function with “None” as the callback prior to shutting down in order to

free memory that was allocated to store the callback.

Note that signing in to multiple servers simultaneously is allowed, so you may receive multiple callbacks with “show” set to true before receiving them with “show” set to false. You can use the third parameter to track show/hide pairs.

Parameters

callback – Callback to be called to show an authentication dialog box.

omni.client.set_hang_detection_time_ms(timeout: int)None

Configure the amount of time to wait before the blocking versions of each function prints a warning (and a stack trace).

Parameters

timeout – The amount of time to wait (in milliseconds) before printing a warning.

omni.client.set_log_callback(callback: Callable[[str, str, omni.client.LogLevel, str], None])None

Set a function which is called any time the library wants to print something to the log.

def log_callback(thread, component, level, message):
    print(f"{thread} {component} {level} {message}")

omni.client.set_log_callback(log_callback)
omni.client.set_log_level(log_level: omni.client.LogLevel)None

Only print messages to the log which are at this level or higher.

omni.client.set_s3_configuration(url: str, bucket: str, region: str, accessKeyId: str, secretAccessKey: str, cloudfrontUrl: str, cloudfrontForList: bool, writeConfig: bool)omni.client.Result

Set S3 configuration for a URI.

Returns

OmniClient Result code.

omni.client.shutdown()None

Shut down the client library.

It is not safe to call any client library functions after calling shutdown.

omni.client.sign_out(url: str)None

Sign out specific url connection.

Parameters

url – Immediately disconnect from the server specified by this URL. Any outstanding requests will call their callbacks with OmniClientResult.ErrorConnection. Additionally, clear the saved authentication token so future requests to this server will trigger re-authentication.

omni.client.stat(url: str)Tuple[omni.client.Result, omni.client.ListEntry]

Deprecated: Use omni.client.stat_async() or omni.client.stat_with_callback() instead.

async omni.client.stat_async(url: str)Tuple[omni.client.Result, omni.client.ListEntry]

Asynchronously Retrieve information about a single item

See: omni.client.stat_with_callback()

omni.client.stat_subscribe_with_callback(url: str, stat_callback: Callable[[omni.client.Result, omni.client.ListEntry], None], subscribe_callback: Callable[[omni.client.Result, omni.client.ListEvent, omni.client.ListEntry], None])omni.client.Subscription

Subscribe to change notifications for a url.

If ‘url’ is a file, you will only receive information about that file. If ‘url’ is a folder, you will only receive information about that folder. ‘stat_callback is called once with the initial stat info,then ‘subscribe_callback’ may be called multiple times after that the item changes.

Parameters
  • url – URL of item to stat.

  • stat_callback – Callback to be called once with the initial stat.

  • subscribe_callback – Callback to be called when changes happen.

Returns

Subscrption object.

omni.client.stat_with_callback(url: str, callback: Callable[[omni.client.Result, omni.client.ListEntry], None])omni.client.Request

Retrieve information about a file or folder.

Parameters
  • url – URL of item to stat.

  • callback – Callback to be called with the results.

Returns

Request object.

omni.client.unlock_with_callback(url: str, callback: Callable[[omni.client.Result], None])omni.client.Request

Unlock a URL so other clients can modify it.

Parameters

url – URL of file to unlock.

omni.client.write_file(url: str, content: bytes, message: str = '')omni.client.Result

Deprecated: Use omni.client.write_file_async() or omni.client.write_file_with_callback() instead.

async omni.client.write_file_async(url: str, content: bytes, message: str = '')omni.client.Result

Asynchronously Write a file

See: omni.client.write_file_with_callback()

omni.client.write_file_with_callback(url: str, content: buffer, callback: Callable[[omni.client.Result], None], message: str = None)omni.client.Request

Create a new file, overwriting if it already exists.

Parameters
  • url – URL of file to create.

  • content – File content.

  • callback – Callback to be called with the result.

  • message – Message to apply to atomic checkpoint of destination url.

Returns

Request object.