Wolfram Research

Function Repository Resource:

LocalResourceObjects

Source Notebook

Get a list of locally stored resource objects

Contributed by: Bob Sandheinrich

ResourceFunction["LocalResourceObjects"][]

returns a list of all resource objects stored on the computer.

ResourceFunction["LocalResourceObjects"][types]

only returns resources of the specified types.

Details and Options

Locally stored resources include both cached resources from the public repositories and custom resources created on the computer.
Published resources are considered locally cached if the resource object information has been retrieved, even if the contents or data of the resource has not been downloaded from the repository.
Typically, resource types correspond to a published repository:
The types can be either a single resource type or a list.

Examples

Basic Examples

List all locally stored resource objects:

In[1]:=
ResourceFunction["LocalResourceObjects"][] // Short
Out[1]=

Find a few locally stored neural net resource objects:

In[2]:=
Take[ResourceFunction["LocalResourceObjects"]["NeuralNet"], UpTo[3]]
Out[2]=

Scope

Find resources of multiple types:

In[3]:=
RandomSample[
 ResourceFunction["LocalResourceObjects"][{"Data", "Function"}], 10]
Out[3]=

Retrieve a NetModel for each "NeuralNet" resource, using the name for a label:

In[4]:=
Labeled[NetModel[#], #["Name"]] & /@ Take[ResourceFunction["LocalResourceObjects"]["NeuralNet"], UpTo[3]]
Out[4]=

Retrieve a ResourceFunction for each "Function" resource:

In[5]:=
ResourceFunction /@ Take[ResourceFunction["LocalResourceObjects"]["Function"], UpTo[3]]
Out[5]=

Find a few locally cached resources from the public resource system:

In[6]:=
RandomChoice[
 Select[ResourceFunction[
   "LocalResourceObjects"][], #["RepositoryLocation"] === URL[$ResourceSystemBase] &], 7]
Out[6]=

Find a random ResourceObject created on this computer:

In[7]:=
RandomChoice[
 Select[ResourceFunction[
   "LocalResourceObjects"][], ! MatchQ[#["RepositoryLocation"], _URL] &]]
Out[7]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

See Also

License Information