connect.system
connect.system
System resources.
Classes
Name | Description |
---|---|
System | System information. |
SystemCaches | System caches. |
SystemRuntimeCache | |
SystemRuntimeCaches | System runtime caches. |
System
connect.system.System(self, ctx, path)
System information.
Attributes
Name | Description |
---|---|
caches | List all system caches. |
SystemCaches
connect.system.SystemCaches(self, ctx, path)
System caches.
Attributes
Name | Description |
---|---|
runtime | System runtime caches. |
SystemRuntimeCache
connect.system.SystemRuntimeCache(self, ctx, path, /, **attributes)
Methods
Name | Description |
---|---|
destroy | Remove a content runtime package cache. |
destroy
connect.system.SystemRuntimeCache.destroy(**kwargs)
Remove a content runtime package cache.
This action is only available to administrators.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dry_run | bool | If True , the cache will not be destroyed, only the operation will be simulated. |
required |
Returns
Name | Type | Description |
---|---|---|
Task | None | The task object if the operation was successful. If dry_run=True , None is returned. |
Examples
from posit.connect import Client
= Client()
client
= client.system.caches.runtime.find()
runtime_caches = runtime_caches[0]
first_runtime_cache
# Remove the cache
= first_runtime_cache.destroy(dry_run=False)
task
# Wait for the task to finish
task.wait_for()
SystemRuntimeCaches
connect.system.SystemRuntimeCaches(self, ctx, path)
System runtime caches.
List all content runtime caches. These include packrat and Python environment caches.
This information is available only to administrators.
Methods
Name | Description |
---|---|
destroy | Delete a content runtime package cache. |
find | List all content runtime caches. |
destroy
connect.system.SystemRuntimeCaches.destroy(**kwargs)
Delete a content runtime package cache.
Delete a content runtime package cache by specifying language, version, and execution environment.
This action is only available to administrators.
Parameters
Name | Type | Description | Default |
---|---|---|---|
language | str | The runtime language of the cache. | required |
version | str | The language version of the cache. | required |
image_name | str | The name of the cache’s execution environment. | required |
dry_run | bool | If True , the cache will not be destroyed, only the operation will be simulated. |
required |
Returns
Name | Type | Description |
---|---|---|
Task | None | The task object if the operation was successful. If dry_run=True , None is returned. |
Examples
from posit.connect import Client
= Client()
client
= client.system.caches.runtime.find()
runtime_caches = runtime_caches[0]
first_runtime_cache
# Remove the cache
= first_runtime_cache.destroy(dry_run=False)
task
# Or, remove the cache by specifying the cache's attributes
= client.system.caches.runtime.destroy(
task ="Python",
language="3.12.5",
version="Local",
image_name=False,
dry_run )
find
connect.system.SystemRuntimeCaches.find()
List all content runtime caches.
List all content runtime caches. These include packrat and Python environment caches.
This information is available only to administrators.
Returns
Name | Type | Description |
---|---|---|
List[SystemRuntimeCache] | List of all content runtime caches. |
Examples
from posit.connect import Client
= Client()
client
= client.system.caches.runtime.find() runtime_caches