# What is a “Paclet”?

I often see references to "paclets", for example the PacletManager context, the PacletInfo.m file in some packages and next to downloaded computable data, $UserBaseDirectory/Paclets, etc. Question: What are "paclets", what is their relevance to end users, and how can one use them with packages? Clarification: Since I saw a PacletInfo.m file in several third party packages as well, I assume that they must be useful in packages and there must be some documentation on how to use them somewhere. I am hoping someone could point me to the relevant documentation. - PacletInfo.m is described in the Wolfram Workbench documentation. – WReach Feb 12 '12 at 15:24 @WReach Can you post that as an answer? – Szabolcs Feb 12 '12 at 15:25 ## 2 Answers A paclet is a distribution mechanism for resources that contribute to the contents of a package. Most of the paclet machinery is in the PacletManager context, which is not public API. It appears that the only part of paclet functionality presently intended for public use involves PacletInfo.m, a descriptor file for Mathematica applications. This is described in the Wolfram Workbench documentation. - Do you by any chance know if this functionality can be used for automatically updating a package (in my case: a palette) from the internet? – Szabolcs Jul 21 '12 at 15:14 @Szabolcs Sorry, I don't know about any such functionality. However, there looks to be some interesting spelunking around PacletInstall, PacletUpdate, etc in NotebookOpen@ FileNameJoin@{$InstallationDirectory, "SystemFiles", "Autoload", "PacletManager", "Kernel", "Manager.m"}. –  WReach Jul 21 '12 at 16:43

Mathematica 6 pioneers the powerful concept of built-in computable data sources. An efficient load-on-demand mechanism makes hundreds of gigabytes of carefully curated and continually updated data immediately available inside Mathematica for use in computations. Mathematica 6 introduces major collections of data in mathematics, physics, chemistry, astronomy, geography, linguistics and finance—all organized and aggregated for the first time by Wolfram Research for direct use in computations.

When you call a data function like FinancialData, Mathematica gets the data it needs from the internet. When you click a link to a documentation notebook or call a data function like CountryData, Mathematica knows whether a newer version of the information is available on a Wolfram Research Paclet Server, and if so it will download and install the update automatically. In the case of smaller paclets like documentation notebooks, this is often so fast that you will not even notice it happening.

Some details of this functionality are found here:

Mathematica‘s data functions download data paclets from our data servers. Hence functions such as CityData,WeatherData, and CountryData will not work on computers disconnected from the internet. It is possible to transfer such paclets from an online to an offline machine with the following steps:

• Download your paclet of interest (e.g. CityData) to the online machine by evaluating this in Mathematica:

CityData[All,"Preload"]

• Locate the paclet repository folder by evaluating:

ToFileName[{\$UserBaseDirectory, "Paclets", "Repository"}]

• And identify the subfolders starting with “CityData” in their names.

• Copy these folders into the equivalent paclet repository folder on your offline machine. (The corresponding location on the offline computer can be found using the same ToFileName evaluation from above.)

• Have the offline Mathematica installation recognize the added data paclets by evaluating :

RebuildPacletData[]

• Finally, evaluate a few examples in the documentation for CityData to verify that the desired data is now available in Mathematica.

Specific use and format of the PacletInfo.m file is provided by Scientific Arts (.nb):

As mentioned above, within the package directory which we are calling MyApplication there will also be a file called PacletInfo.m. This is a file with a specific structure which tells Mathematica what is contained within the Guides, Tutorials, and ReferencePages directories and how the Documentation Center should categorize and access them. The PacletInfo.m file is a plain text file with elements that describe what sorts of materials are contained in the Guides, Tutorials, and ReferencePages directories as well as things such as what Context the functions described within the ReferencePages belong to. Also it lets the Documentation Center know how to list the material on the Installed Add-Ons page that is linked to from the front page of the Documentation Center.

Read the Notebook for much more complete coverage.

-
Why do some packages contain a PacletInfo.m file then? See for example this package‌​. What is the function of PacletInfo.m and can I make use of it in my own packages? –  Szabolcs Feb 12 '12 at 13:00
I clarified the question a bit. –  Szabolcs Feb 12 '12 at 13:05
@Szabolcs I see. I figured you were asking this as a beginner's question. Thanks for not completely changing the question and pulling the rug out from under me. –  Mr.Wizard Feb 12 '12 at 13:08
The downloaded computable data also has a PacletInfo.m`, this is a relevant answer. –  Szabolcs Feb 12 '12 at 13:09
@Szabolcs does the linked Notebook cover what you're after? –  Mr.Wizard Feb 12 '12 at 13:24