Exporting files as a Python or R package

If you organize the files in a project as an installable package, then you can choose to export it as such. When another project import this project, Domino will automatically install the package at runtime, making it available to your code.

To export as a package, configure your project to export files, and select the appropriate language under “code package”.


You must follow the language-specific pattern required for any package, described below.


For an in-depth guide to writing R extensions, please reference the official manual.

In summary, each R package requires:

  • A directory called R/ containing code files.

  • A directory called man/ containing documentation files

  • A file named DESCRIPTION, with each line following the pattern <key>: <value>. Required keys include:

Version (e.g. 0.1)
Maintainer (a name followed by an email address in angle brackets, e.g. Sample Maintainer <maintainer@example.com>)
  • A file named NAMESPACE that describes the namespace of the package. If you aren’t sure what to put here, exportPattern( "." ) can work in many cases.


For an in-depth guide, please reference this documentation.

In summary, each Python package requires:

  • A setup.py file. This must contain a setup() function (imported from setuptools), with arguments as described here.

  • A folder containing your Python modules and packages. Usually this is given the same name as the overall package.

  • It’s also a good idea to include some sort of README file.