Package Usage and Development » Paclet Usage

Paclet Servers

We talked about the basic paclet installation process before, but one place where paclets are very useful is when setup to be distributed on a server.

Wolfram Research has a main paclet server it distributes its paclets from, but users can also create their own servers. As an example of this, some members of the Mathematica StackExchange have built a custom public paclet server that serves paclets developed by members of the community.

PacletSites

The PacletManager keeps track of the active set of servers via its PacletSites system. We can see the currently configured set:

 PacletSites[]
 {PacletSite["http://pacletserver.wolfram.com","Wolfram Research Paclet Server","Local"->False]}

We can add a server via PacletSiteAdd :

 PacletSiteAdd[
  "http://raw.githubusercontent.com/paclets/PacletServer/master",
  "Public paclet server"
  ]
 PacletSite["http://raw.githubusercontent.com/paclets/PacletServer/master","Public paclet server","Local"->False]

This is now permanently added to the PacletSites :

 PacletSites[]
 {PacletSite["http://pacletserver.wolfram.com","Wolfram Research Paclet Server","Local"->False],PacletSite["http://raw.githubusercontent.com/paclets/PacletServer/master","Public paclet server","Local"->False]}

If we want to check for updates on our sites we can use PacletSiteUpdate to do so:

 PacletSiteUpdate["http://raw.githubusercontent.com/paclets/PacletServer/master"]
 PacletSite["http://raw.githubusercontent.com/paclets/PacletServer/master","Public paclet server","Local"->False]

Finally, if we want to remove this we can do so with PacletSiteRemove :

 PacletSiteRemove["http://raw.githubusercontent.com/paclets/PacletServer/master"]
 {PacletSite["http://pacletserver.wolfram.com","Wolfram Research Paclet Server","Local"->False]}

Finding Paclets on a Server

We can find paclets located on a server with PacletFindRemote . First we'll add a different paclet server:

 
PacletSiteAdd["http://www.wolframcloud.com/objects/b3m2a1.paclets/PacletServer"];
PacletSiteUpdate["http://www.wolframcloud.com/objects/b3m2a1.paclets/PacletServer"];

Now we'll look for a version of the "BTools" package on that server

 PacletFindRemote[{"BTools", "2.1.25"}]
322pacletservers-5296222007074979075

Now that we're done with this we can remove it again:

 PacletSiteRemove["http://www.wolframcloud.com/objects/b3m2a1.paclets/PacletServer"];

Installing Paclets off A Server

If a paclet server has been added, it's easy to install paclets off of it, as PacletInstall will do this by default. If not, we can always pass the site in the "Site" option to it.