====================================
Using Anaconda Repository (AER 2.24)
====================================

.. raw:: html

    <div class="section" id="installing-anaconda-client">
    <span id="repo-installing-anaconda-client"></span><h2>Installing anaconda-client<a class="headerlink" href="#installing-anaconda-client" title="Permalink to this headline">¶</a></h2>
    <p>NOTE: Anaconda Client is NOT necessary to search for and download packages.</p>
    <p>The Anaconda client command line
    interface (CLI) is used in a Terminal window to build and upload packages,
    connect to and manage your Anaconda Repository account from a Terminal
    window, upload packages you have created, and generate access tokens to
    manage access to private packages.</p>
    <p>This tool can be installed in three ways: with conda, with PIP, or
    with PIP from source. We recommend using conda.</p>
    <p>Option 1, <a class="reference external" href="http://conda.pydata.org/">conda</a>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</span>
    </pre></div>
    </div>
    <p>Option 2, <a class="reference external" href="https://pip.pypa.io/en/latest/">PIP</a>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</span>
    </pre></div>
    </div>
    <p>Option 3, installing with pip from source:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">git</span><span class="o">+</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">Anaconda</span><span class="o">-</span><span class="n">Server</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">client</span>
    </pre></div>
    </div>
    <p>After installing, view the complete list of CLI tasks with this command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="o">-</span><span class="n">h</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="packages">
    <span id="repo-using-packages"></span><h2>Packages<a class="headerlink" href="#packages" title="Permalink to this headline">¶</a></h2>
    <p>All files uploaded to Anaconda Repository are stored in packages. Each
    Anaconda Repository package is visible at its own unique URL based on the
    name of the
    user who owns the package and the name of the package.</p>
    <p>For example, if a user
    &#8220;travis&#8221; uploads a test package named &#8220;testpkg&#8221;, it will be visible at
    <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/travis/testpkg</span></code>.</p>
    <p>These Anaconda Repository packages may contain
    multiple files, and these files may be data files such as comma separated value
    (CSV), tab separated value (TSV), or text (TXT), or package files such as conda
    packages, PyPI packages, or R packages.</p>
    <p>Users can create an Anaconda Repository
    package, and then upload files into it.</p>
    <div class="section" id="namespaces">
    <h3>Namespaces<a class="headerlink" href="#namespaces" title="Permalink to this headline">¶</a></h3>
    <p>Each user and organization has their own location called a <strong>user
    namespace</strong> where they may host packages. You can view the public
    packages in a user or organization&#8217;s namespace by navigating to their
    user page.</p>
    <p>EXAMPLE: The travis user namespace
    located at <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/travis</span></code> contains packages that were
    uploaded and shared by the user whose account is named Travis.</p>
    <p>NOTE: All packages are public if uploaded by users of free accounts.
    Packages may be designated as private by upgrading to a paid account.</p>
    <p>Anaconda Repository supports two package managers,
    <a class="reference internal" href="#repo-using-conda-packages"><span class="std std-ref">conda</span></a> and
    <a class="reference internal" href="#repo-using-pypi-packages"><span class="std std-ref">PyPI</span></a>. To work with conda or PyPI packages,
    you must use their corresponding subdomains:</p>
    <ul class="simple">
    <li>To install <strong>conda</strong> packages from the user travis, use the repository
    url <code class="docutils literal"><span class="pre">https://conda.&lt;your-anaconda-repo&gt;/travis</span></code></li>
    <li>To install <strong>pypi</strong> packages from the user travis, use the repository
    url <code class="docutils literal"><span class="pre">https://pypi.&lt;your-anaconda-repo&gt;/travis</span></code></li>
    </ul>
    </div>
    <div class="section" id="labels">
    <h3>Labels<a class="headerlink" href="#labels" title="Permalink to this headline">¶</a></h3>
    <p>The use of labels allows package authors to upload files
    for development or testing purposes without affecting non-development
    users.</p>
    <p>Each file within a package may be tagged with one or more labels, or not
    tagged at all to accept the default label.</p>
    <p>The default label is <strong>main</strong>, so packages that are uploaded without
    specifying a label are automatically labeled &#8220;main&#8221;.</p>
    <p>The version labeled
    main is also downloaded by default, unless a user specifies a different
    label. So, if a file is labeled <strong>main</strong> then the label name may be
    omitted from the URL. For example the following repositories are
    equivalent:</p>
    <ul class="simple">
    <li><code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/sean/label/main</span></code></li>
    <li><code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/sean</span></code></li>
    </ul>
    <p>Commands such as <code class="docutils literal"><span class="pre">conda</span> <span class="pre">install</span></code> can be used with a channel or used
    with a channel and a label:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>conda install —-channel sean selenium
    conda install —-channel sean/label/dev selenium
    conda install —-channel sean/label/stable selenium
    </pre></div>
    </div>
    </div>
    <div class="section" id="conda-packages">
    <span id="repo-using-conda-packages"></span><h3>Conda packages<a class="headerlink" href="#conda-packages" title="Permalink to this headline">¶</a></h3>
    <div class="section" id="uploading">
    <span id="repo-uploading-conda-packages"></span><h4>Uploading<a class="headerlink" href="#uploading" title="Permalink to this headline">¶</a></h4>
    <p>This example shows how to build and upload a
    <a class="reference external" href="http://conda.pydata.org/">conda</a> package to Anaconda Repository using
    conda build.</p>
    <p>Before you start, install Anaconda client and conda build:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</span> <span class="n">conda</span><span class="o">-</span><span class="n">build</span>
    </pre></div>
    </div>
    <p>Now choose the repository you would like to build the package for. In
    this example we&#8217;ll use a simple public <a class="reference external" href="https://github.com/Anaconda-Server/anaconda-client/tree/master/example-packages/conda">conda test
    package</a>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">Anaconda</span><span class="o">-</span><span class="n">Server</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">client</span>
    <span class="n">cd</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</span><span class="o">/</span><span class="n">example</span><span class="o">-</span><span class="n">packages</span><span class="o">/</span><span class="n">conda</span><span class="o">/</span>
    </pre></div>
    </div>
    <p>In this directory we can see two required files:
    <a class="reference external" href="https://github.com/Anaconda-Server/anaconda-client/blob/master/example-packages/conda/meta.yaml">meta.yaml</a>
    and
    <a class="reference external" href="https://github.com/Anaconda-Server/anaconda-client/blob/master/example-packages/conda/build.sh">build.sh</a>
    (for Linux or Mac) or bld.bat (for Windows).</p>
    <p>To build the package, turn
    off automatic anaconda-client uploading, and then run the conda build
    command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">config</span> <span class="o">--</span><span class="nb">set</span> <span class="n">anaconda_upload</span> <span class="n">no</span>
    <span class="n">conda</span> <span class="n">build</span> <span class="o">.</span>
    </pre></div>
    </div>
    <p>All packages built in this way are placed in a subdirectory of
    <a class="reference internal" href="../../anaconda/index.html"><span class="doc">Anaconda&#8217;s</span></a> <em>conda-bld</em>
    directory. You can check where the resulting file was placed with the
    <code class="docutils literal"><span class="pre">--output</span></code> option:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">build</span> <span class="o">.</span> <span class="o">--</span><span class="n">output</span>
    </pre></div>
    </div>
    <p>Now upload the test package to Anaconda Repository with the <a class="reference internal" href="cli.html#repo-cli-upload"><span class="std std-ref">anaconda
    upload</span></a> command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">login</span>
    <span class="n">anaconda</span> <span class="n">upload</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">conda</span><span class="o">-</span><span class="n">package</span><span class="o">.</span><span class="n">tar</span><span class="o">.</span><span class="n">bz2</span>
    </pre></div>
    </div>
    <p>You may also wish to read the articles <a class="reference external" href="http://conda.pydata.org/docs/building/bpp.html">Building conda
    packages</a> and
    <a class="reference external" href="http://conda.pydata.org/docs/build_tutorials.html">Tutorials on conda
    build</a> for more
    information on conda&#8217;s overall build framework.</p>
    </div>
    <div class="section" id="installing">
    <h4>Installing<a class="headerlink" href="#installing" title="Permalink to this headline">¶</a></h4>
    <p>Install conda packages from Anaconda Repository by adding channels to your
    conda config.</p>
    <p>Conda knows how to interact with Anaconda Repository. Specifying the channel
    <code class="docutils literal"><span class="pre">sean</span></code> translates to
    <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/sean</span></code>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">config</span> <span class="o">--</span><span class="n">add</span> <span class="n">channels</span> <span class="n">sean</span>
    </pre></div>
    </div>
    <p>Now you can install public conda packages from sean&#8217;s Anaconda Repository
    account. Try installing the testci
    package at <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/sean/testci</span></code>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">testci</span>
    </pre></div>
    </div>
    </div>
    </div>
    <div class="section" id="pypi-packages">
    <span id="repo-using-pypi-packages"></span><h3>PyPI packages<a class="headerlink" href="#pypi-packages" title="Permalink to this headline">¶</a></h3>
    <div class="section" id="uploading-pypi-packages">
    <span id="repo-uploading-pypi-packages"></span><h4>Uploading PyPI packages<a class="headerlink" href="#uploading-pypi-packages" title="Permalink to this headline">¶</a></h4>
    <p>We can test PyPI package uploading with a small public example package saved in
    the <a class="reference external" href="https://github.com/Anaconda-Server/anaconda-client/tree/master/example-packages/pypi">anaconda-client
    repository</a>.</p>
    <p>Begin by cloning the repository from the command line:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">git</span><span class="nd">@github</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="n">Anaconda</span><span class="o">-</span><span class="n">Server</span><span class="o">/</span><span class="n">conda</span><span class="o">-</span><span class="n">server</span><span class="o">.</span><span class="n">git</span>
    <span class="n">cd</span> <span class="n">conda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">example</span><span class="o">-</span><span class="n">packages</span><span class="o">/</span><span class="n">pypi</span><span class="o">/</span>
    </pre></div>
    </div>
    <p>Now you can create your PyPI package with the <code class="docutils literal"><span class="pre">setup.py</span></code> script:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">sdist</span>
    </pre></div>
    </div>
    <p>The package has now been built as a source tarball and is ready to be
    uploaded:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">upload</span> <span class="n">dist</span><span class="o">/*.</span><span class="n">tar</span><span class="o">.</span><span class="n">gz</span>
    </pre></div>
    </div>
    <p>Your package is now available at
    <code class="docutils literal"><span class="pre">http://&lt;your-anaconda-repo&gt;/USERNAME/PACKAGE</span></code>.</p>
    </div>
    <div class="section" id="installing-pypi-packages">
    <h4>Installing PyPI packages<a class="headerlink" href="#installing-pypi-packages" title="Permalink to this headline">¶</a></h4>
    <p>The best way to install a PyPI package is using pip. For the following,
    we will use the package we authored in the examples above:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">extra</span><span class="o">-</span><span class="n">index</span><span class="o">-</span><span class="n">url</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">pypi</span><span class="o">.&lt;</span><span class="n">your</span><span class="o">-</span><span class="n">anaconda</span><span class="o">-</span><span class="n">repo</span><span class="o">&gt;/</span><span class="n">USERNAME</span><span class="o">/</span><span class="n">simple</span> <span class="n">pypi</span><span class="o">-</span><span class="n">test</span><span class="o">-</span><span class="n">package</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="installing-private-pypi-packages">
    <h4>Installing private PyPI packages<a class="headerlink" href="#installing-private-pypi-packages" title="Permalink to this headline">¶</a></h4>
    <p>All Anaconda Repository urls can be prefixed with <code class="docutils literal"><span class="pre">/t/$TOKEN</span></code> to access
    private packages:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>TOKEN=$(anaconda auth --create --name YOUR-TOKEN-NAME)
    pip install --index-url https://pypi.&lt;your-anaconda-repo&gt;/t/$TOKEN/USERNAME/simple test-package
    </pre></div>
    </div>
    <p>NOTE: Replace YOUR-TOKEN-NAME with a name for the token and replace $TOKEN with
    the actual random string generated when you created the token.</p>
    </div>
    </div>
    <div class="section" id="uploading-packages">
    <h3>Uploading packages<a class="headerlink" href="#uploading-packages" title="Permalink to this headline">¶</a></h3>
    <p>To upload package files to Anaconda Repository use the
    <a class="reference internal" href="cli.html"><span class="doc">anaconda-client</span></a> command line interface and the
    <a class="reference internal" href="cli.html#repo-cli-upload"><span class="std std-ref">upload</span></a> command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">login</span>
    <span class="n">anaconda</span> <span class="n">upload</span> <span class="n">PACKAGENAME</span>
    </pre></div>
    </div>
    <p>Anaconda Repository automatically detects packages and notebooks, package or
    notebook types, and their versions.</p>
    <p>Your package is now available at:
    <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/&lt;USERNAME&gt;/&lt;PACKAGENAME&gt;</span></code></p>
    <p>Your package can be also downloaded by anyone using the Anaconda CLI:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">download</span> <span class="n">USERNAME</span><span class="o">/</span><span class="n">PACKAGENAME</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="private-packages">
    <span id="repo-using-private-packages"></span><h3>Private packages<a class="headerlink" href="#private-packages" title="Permalink to this headline">¶</a></h3>
    <p>By default all packages, notebooks and environments uploaded to Anaconda Repository are accessible to anyone who has access to the repository.</p>
    <p>Packages uploaded to your user channel on Anaconda Repository can be marked as private through the Web UI by selecting the package, clicking the Settings tab and clicking Admin from the sidebar.</p>
    <p>Alternatively,
    you can reach this page with the following URL:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">https</span><span class="p">:</span><span class="o">//&lt;</span><span class="n">your</span><span class="o">-</span><span class="n">anaconda</span><span class="o">-</span><span class="n">repo</span><span class="o">&gt;/&lt;</span><span class="n">username</span><span class="o">&gt;/&lt;</span><span class="n">package</span><span class="o">&gt;/</span><span class="n">settings</span><span class="o">/</span><span class="n">admin</span>
    </pre></div>
    </div>
    <p>NOTE: Jupyter Notebooks and conda environments can also be marked private using this procedure and URL.</p>
    <p>Other Anaconda Repository users may access your private packages either with tokens or by logging in.</p>
    <div class="section" id="private-packages-with-tokens">
    <h4>Private packages with tokens<a class="headerlink" href="#private-packages-with-tokens" title="Permalink to this headline">¶</a></h4>
    <p>To make your private packages available to be accessed with tokens, first create
    an <a class="reference internal" href="managing-account.html#repo-using-tokens"><span class="std std-ref">access token</span></a> that includes the following scope for the Anaconda client CLI:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span><span class="p">:</span><span class="n">download</span>
    </pre></div>
    </div>
    <p>or in your web browser with:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Allow</span> <span class="n">private</span> <span class="n">downloads</span> <span class="kn">from</span> <span class="nn">Conda</span> <span class="n">repositories</span>
    </pre></div>
    </div>
    <p>The token is a random alphanumeric string and this is used to install a package or add
    a channel from which you wish to install private packages.</p>
    <p>Using the provided token a user&#8217;s channel can be added to the config with:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">config</span> <span class="o">--</span><span class="n">add</span> <span class="n">channels</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">conda</span><span class="o">.&lt;</span><span class="n">your</span><span class="o">-</span><span class="n">anaconda</span><span class="o">-</span><span class="n">repo</span><span class="o">&gt;/</span><span class="n">t</span><span class="o">/&lt;</span><span class="n">token</span><span class="o">&gt;/&lt;</span><span class="n">channel</span><span class="o">&gt;</span>
    </pre></div>
    </div>
    <p>The token can also be used to install packages without first adding the channel:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="o">-</span><span class="n">c</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">conda</span><span class="o">.&lt;</span><span class="n">your</span><span class="o">-</span><span class="n">anaconda</span><span class="o">-</span><span class="n">repo</span><span class="o">&gt;/</span><span class="n">t</span><span class="o">/&lt;</span><span class="n">token</span><span class="o">&gt;/&lt;</span><span class="n">channel</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">package</span><span class="o">&gt;</span>
    </pre></div>
    </div>
    <p>Private pypi packages can also be installed using:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">pypi</span><span class="o">.&lt;</span><span class="n">your</span><span class="o">-</span><span class="n">anaconda</span><span class="o">-</span><span class="n">repo</span><span class="o">&gt;/</span><span class="n">t</span><span class="o">/&lt;</span><span class="n">token</span><span class="o">&gt;/&lt;</span><span class="n">channel</span><span class="o">&gt;</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="private-packages-with-login">
    <h4>Private packages with login<a class="headerlink" href="#private-packages-with-login" title="Permalink to this headline">¶</a></h4>
    <p>To make your private package available to users who have logged in,</p>
    <ol class="arabic simple">
    <li>Create an <a class="reference internal" href="#repo-organizations"><span class="std std-ref">organization</span></a>.</li>
    <li>Create a group in that organization, which may be a read-only group.</li>
    <li>Add the users you want to be able to download
    and install the package to the group.</li>
    <li>Upload the package to the organization, or transfer an existing
    package to the organization.</li>
    </ol>
    <p>Now another user can download and install your package using the web
    interface or Anaconda client.</p>
    <ol class="arabic simple">
    <li>In their web browser, they can navigate to your channel.</li>
    </ol>
    <p>2. If the
    organization name is &#8220;OrgName&#8221; and the package name is &#8220;conda-package&#8221;, the user
    would use these commands:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</span>
    <span class="n">anaconda</span> <span class="n">login</span>
    <span class="n">conda</span> <span class="n">install</span> <span class="o">-</span><span class="n">c</span> <span class="n">OrgName</span> <span class="n">conda</span><span class="o">-</span><span class="n">package</span>
    </pre></div>
    </div>
    </div>
    </div>
    <div class="section" id="uploading-other-types-of-files">
    <h3>Uploading other types of files<a class="headerlink" href="#uploading-other-types-of-files" title="Permalink to this headline">¶</a></h3>
    <p>In addition to uploading packages, you can also upload other types of
    files to Anaconda Repository. In this example we will upload a spreadsheet
    named &#8220;baby-names&#8221; in comma separated value (CSV) format. Any type of file
    can be uploaded with the Anaconda CLI by using these steps. First we will create
    the new package on Anaconda Repository, which will create a namespace that can hold
    multiple files. Then we will upload the file into this namespace.</p>
    <ol class="arabic">
    <li><p class="first">Use the <a class="reference internal" href="cli.html"><span class="doc">anaconda-client</span></a> command line interface to
    create a new package and namespace for your file on Anaconda Repository:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">login</span>
    <span class="n">anaconda</span> <span class="n">package</span> <span class="o">--</span><span class="n">create</span> <span class="n">USERNAME</span><span class="o">/</span><span class="n">baby</span><span class="o">-</span><span class="n">names</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Now upload the file to the new namespace. PyPI package files, conda package
    files and notebook files are automatically detected. There is no auto-detect
    for other types of files, so you must explicitly specify the &#8216;package&#8217;,
    &#8216;package-type&#8217; and &#8216;version&#8217; fields.</p>
    <p>In this example the user or organization name is travis, the package name is
    baby-names, the package type is a file, this is the first version that we are
    uploading, and the full filename is baby-names1.csv:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">upload</span> <span class="o">--</span><span class="n">user</span> <span class="n">travis</span> <span class="o">--</span><span class="n">package</span> <span class="n">baby</span><span class="o">-</span><span class="n">names</span> <span class="o">--</span><span class="n">package</span><span class="o">-</span><span class="nb">type</span> <span class="n">file</span> <span class="o">--</span><span class="n">version</span> <span class="mi">1</span> <span class="n">baby</span><span class="o">-</span><span class="n">names1</span><span class="o">.</span><span class="n">csv</span>
    </pre></div>
    </div>
    </li>
    </ol>
    </div>
    <div class="section" id="downloading-other-types-of-files">
    <h3>Downloading other types of files<a class="headerlink" href="#downloading-other-types-of-files" title="Permalink to this headline">¶</a></h3>
    <p>Your file is available at
    <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/&lt;USERNAME&gt;/&lt;babynames&gt;</span></code></p>
    <p>Your file can also be downloaded by anyone using the Anaconda CLI:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">download</span> <span class="n">USERNAME</span><span class="o">/</span><span class="n">baby</span><span class="o">-</span><span class="n">names</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="remove-a-past-version-of-a-package">
    <h3>Remove a past version of a package<a class="headerlink" href="#remove-a-past-version-of-a-package" title="Permalink to this headline">¶</a></h3>
    <p>To remove a past version of one of your packages from Anaconda Repository:</p>
    <ol class="arabic simple">
    <li>Click the package name.</li>
    <li>Click the tab &#8220;Files&#8221;.</li>
    <li>Click the checkbox to the left of the version you wish to remove.</li>
    <li>Click the &#8220;Actions&#8221; menu and then &#8220;Remove&#8221;.</li>
    </ol>
    <p>You may instead use the <a class="reference internal" href="cli.html"><span class="doc">command line interface</span></a>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">remove</span> <span class="n">jsmith</span><span class="o">/</span><span class="n">testpack</span><span class="o">/</span><span class="mf">0.2</span>
    </pre></div>
    </div>
    <p>NOTE: Replace <code class="docutils literal"><span class="pre">jsmith</span></code>, <code class="docutils literal"><span class="pre">testpack</span></code>, and <code class="docutils literal"><span class="pre">0.2</span></code> with your actual
    user name, package name, and version.</p>
    <p>The change can now be seen on your profile page:
    <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/&lt;USERNAME&gt;/&lt;PACKAGE&gt;</span></code></p>
    </div>
    <div class="section" id="add-a-collaborator-to-a-package">
    <h3>Add a collaborator to a package<a class="headerlink" href="#add-a-collaborator-to-a-package" title="Permalink to this headline">¶</a></h3>
    <p>You can add other users that are not part of an organization to collaborate on
    your packages. You&#8217;ll need to know the username of the other user(s).</p>
    <ul class="simple">
    <li>From your dashboard select the package for which you want to add a
    collaborator by clicking on its name.</li>
    <li>Click the Settings option to display the package settings.</li>
    <li>Click the Collaborators option.</li>
    <li>Enter the username of the person you want to add as a collaborator
    and click the Add button.</li>
    </ul>
    <p>NOTE: All collaborators are given full read/write permissions to the package,
    even private packages.</p>
    </div>
    <div class="section" id="remove-a-collaborator-from-a-package">
    <h3>Remove a collaborator from a package<a class="headerlink" href="#remove-a-collaborator-from-a-package" title="Permalink to this headline">¶</a></h3>
    <p>To revoke package access previously granted to a collaborator:</p>
    <ul class="simple">
    <li>From your dashboard select the package for which you want to add a
    collaborator by clicking on its name.</li>
    <li>Click the Settings option to display the package settings.</li>
    <li>Click the Collaborators option to display the current
    collaborators.</li>
    <li>Click the red X button next to a collaborator to revoke their access.</li>
    </ul>
    </div>
    <div class="section" id="transfer-a-package-to-a-new-owner">
    <h3>Transfer a package to a new owner<a class="headerlink" href="#transfer-a-package-to-a-new-owner" title="Permalink to this headline">¶</a></h3>
    <p>By default, when you create or add packages, they are attached to your
    individual profile. You can transfer ownership to another owner account
    you control, such as an Organization profile you manage. To
    transfer a package to a new owner:</p>
    <ul class="simple">
    <li>From your dashboard (or the dashboard of an organization you
    administer), select the package for which you want to transfer
    ownership. The system displays options for that package.</li>
    <li>Click the Settings option to display the package settings.</li>
    <li>Click the Admin option.</li>
    <li>Under Transfer this package to a new owner, click the Transfer
    button.</li>
    <li>Select the organization name for the new owner and click the Transfer
    Ownership button.</li>
    </ul>
    </div>
    <div class="section" id="delete-a-package">
    <h3>Delete a package<a class="headerlink" href="#delete-a-package" title="Permalink to this headline">¶</a></h3>
    <p>To delete one of your packages from Anaconda Repository, including all of its
    versions:</p>
    <ol class="arabic simple">
    <li>Click the package name.</li>
    <li>Click the tab &#8220;Settings&#8221;.</li>
    <li>Click &#8220;Admin&#8221; on the left side menu.</li>
    <li>Click &#8220;Delete&#8221;.</li>
    </ol>
    <p>You may instead use the <a class="reference internal" href="cli.html"><span class="doc">command line interface</span></a>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">remove</span> <span class="n">jsmith</span><span class="o">/</span><span class="n">testpak</span>
    </pre></div>
    </div>
    <p>NOTE: Replace <code class="docutils literal"><span class="pre">jsmith</span></code> and <code class="docutils literal"><span class="pre">testpak</span></code> with your actual user name and
    package name.</p>
    <p>The change can now be seen on your profile page:
    <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/&lt;USERNAME&gt;</span></code></p>
    </div>
    </div>
    <div class="section" id="notebooks">
    <h2>Notebooks<a class="headerlink" href="#notebooks" title="Permalink to this headline">¶</a></h2>
    <p>Upload a <a class="reference external" href="http://jupyter.org/">Jupyter notebook</a> (formerly IPython
    notebook) to Anaconda Repository:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">upload</span> <span class="n">my</span><span class="o">-</span><span class="n">notebook</span><span class="o">.</span><span class="n">ipynb</span>
    </pre></div>
    </div>
    <p>An HTML version of the notebook will be at:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">notebooks</span><span class="o">.&lt;</span><span class="n">your</span><span class="o">-</span><span class="n">anaconda</span><span class="o">-</span><span class="n">repo</span><span class="o">&gt;/&lt;</span><span class="n">USERNAME</span><span class="o">&gt;/</span><span class="n">my</span><span class="o">-</span><span class="n">notebook</span>
    </pre></div>
    </div>
    <p>Anyone can download it:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">download</span> <span class="n">username</span><span class="o">/</span><span class="n">my</span><span class="o">-</span><span class="n">notebook</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="environments">
    <h2>Environments<a class="headerlink" href="#environments" title="Permalink to this headline">¶</a></h2>
    <p>Save a <a class="reference external" href="http://conda.pydata.org/docs/using/envs.html">conda
    environment</a> and upload
    it to Anaconda Repository:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">env</span> <span class="n">export</span> <span class="o">-</span><span class="n">n</span> <span class="n">my</span><span class="o">-</span><span class="n">environment</span>
    <span class="n">conda</span> <span class="n">env</span> <span class="n">upload</span> <span class="n">my</span><span class="o">-</span><span class="n">environment</span>
    </pre></div>
    </div>
    <p>A list of your uploaded environments is at:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">envs</span><span class="o">.&lt;</span><span class="n">your</span><span class="o">-</span><span class="n">anaconda</span><span class="o">-</span><span class="n">repo</span><span class="o">&gt;/&lt;</span><span class="n">USERNAME</span><span class="o">&gt;</span>
    </pre></div>
    </div>
    <p>Anyone can download and install your environment from Anaconda Repository:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">env</span> <span class="n">create</span> <span class="n">user</span><span class="o">/</span><span class="n">my</span><span class="o">-</span><span class="n">environemnt</span>
    <span class="n">source</span> <span class="n">activate</span> <span class="n">my</span><span class="o">-</span><span class="n">environment</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="organizations">
    <span id="repo-organizations"></span><h2>Organizations<a class="headerlink" href="#organizations" title="Permalink to this headline">¶</a></h2>
    <p>Organizations enable you to maintain group-owned repositories.</p>
    <div class="section" id="create-organization">
    <span id="repo-creating-orgs"></span><h3>Create organization<a class="headerlink" href="#create-organization" title="Permalink to this headline">¶</a></h3>
    <p>To create an organization:</p>
    <ul class="simple">
    <li>Log in to your Anaconda Repository.</li>
    <li>Select the Organizations item from the Tools pull-down menu
    and scroll to the bottom of the page.</li>
    <li>Supply an organization name. NOTE: Organization names cannot include
    spaces or special characters.</li>
    <li>Supply an email address, then click the Create Organization button.
    The system displays the dashboard for the new organization.</li>
    </ul>
    <p>As the creator and owner of an organization, you have automatic
    administrative access to this organization and any packages associated
    with the organization.</p>
    <p>The Group Membership page from the Tools pull-down menu shows a list of all organizations to
    which you belong.</p>
    </div>
    <div class="section" id="delete-an-organization">
    <h3>Delete an organization<a class="headerlink" href="#delete-an-organization" title="Permalink to this headline">¶</a></h3>
    <p>To delete an organization you administer and erase all data associated
    with it:</p>
    <ul class="simple">
    <li>Select &#8220;Switch To&#8221; from the Profile pull-down menu.</li>
    <li>Select organization you wish to delete.</li>
    <li>Select &#8220;Settings&#8221; from the Profile pull-down menu.</li>
    <li>Click the &#8220;Account&#8221; option. You may be asked to verify your password.</li>
    <li>Under the &#8220;Delete Account&#8221; section, click the &#8220;Delete&#8221; button. The
    confirmation page will request that you provide the full name of the
    organization.</li>
    </ul>
    </div>
    <div class="section" id="customize-users-and-groups">
    <span id="repo-org-groups"></span><h3>Customize users and groups<a class="headerlink" href="#customize-users-and-groups" title="Permalink to this headline">¶</a></h3>
    <p>Administrators may add, remove or edit group and user access. To access
    these features, first Switch To the organization profile from the Profile
    pull-down menu.</p>
    <p>After switching from your user view to an organization view, you can
    review and edit the current group and user access for an organization,
    as well as add new groups and users at this address:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">https</span><span class="p">:</span><span class="o">//&lt;</span><span class="n">your</span><span class="o">-</span><span class="n">anaconda</span><span class="o">-</span><span class="n">repo</span><span class="o">&gt;/&lt;</span><span class="n">OrgName</span><span class="o">&gt;/</span><span class="n">groups</span><span class="o">/</span>
    </pre></div>
    </div>
    <p>by selecting Groups from the Tools pull-down menu.</p>
    <p>Users will receive a dashboard notification when you add them to an
    organization.</p>
    </div>
    <div class="section" id="uploading-packages-to-an-organization">
    <h3>Uploading packages to an organization<a class="headerlink" href="#uploading-packages-to-an-organization" title="Permalink to this headline">¶</a></h3>
    <p>To upload a package to an organization, use the <code class="docutils literal"><span class="pre">-u/--user</span></code> option:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">upload</span> <span class="o">--</span><span class="n">user</span> <span class="o">&lt;</span><span class="n">OrgName</span><span class="o">&gt;</span> <span class="n">package</span><span class="o">.</span><span class="n">tar</span><span class="o">.</span><span class="n">bz2</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="create-groups-for-differing-access-levels">
    <h3>Create groups for differing access levels<a class="headerlink" href="#create-groups-for-differing-access-levels" title="Permalink to this headline">¶</a></h3>
    <p>Within an organization, you can create a group to customize access for a
    group of users:</p>
    <ul class="simple">
    <li>Click the +New Group button. Give the group a name, and assign the
    desired permissions (Read-Only, Read-Write, or Administration).</li>
    <li>Add the desired members by username in the Members box.</li>
    <li>Add the packages which this group can access in the Packages box.</li>
    <li>Click the Save Group button.</li>
    </ul>
    </div>
    </div>
    <div class="section" id="using-labels-in-the-development-cycle">
    <span id="repo-using-labels-in-the-development-cycle"></span><h2>Using labels in the development cycle<a class="headerlink" href="#using-labels-in-the-development-cycle" title="Permalink to this headline">¶</a></h2>
    <p>Labels can be used to facilitate a development cycle and organize the
    code that is in development, in testing, and in production.</p>
    <p>Anacona Repository labels allow you to upload files to your packages and
    control how they are accessed.</p>
    <p>With Anaconda Repository labels you can upload a file to a specific label, so
    only users who put that label in the URL they search will be able to
    install it. This is particularly useful for moving a package through a
    development and testing flow.</p>
    <p>In this example we will show you how to use a <code class="docutils literal"><span class="pre">test</span></code> label, so that
    you can upload files without affecting your production quality packages.
    Without a <code class="docutils literal"><span class="pre">--label</span></code> argument the default label is <code class="docutils literal"><span class="pre">main</span></code>.</p>
    <p>Let&#8217;s start with a conda package. If you don&#8217;t have one, use our example
    conda package. Before you build the package edit the version in the
    <code class="docutils literal"><span class="pre">meta.yaml</span></code> file in <code class="docutils literal"><span class="pre">anaconda-client/example-packages/conda/</span></code> to be
    2.0.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">Anaconda</span><span class="o">-</span><span class="n">Server</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">client</span>
    <span class="n">cd</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</span><span class="o">/</span><span class="n">example</span><span class="o">-</span><span class="n">packages</span><span class="o">/</span><span class="n">conda</span><span class="o">/</span>
    <span class="n">vim</span> <span class="n">meta</span><span class="o">.</span><span class="n">yaml</span> <span class="c1"># Bump version to 2.0</span>
    <span class="n">conda</span> <span class="n">config</span> <span class="o">--</span><span class="nb">set</span> <span class="n">anaconda_upload</span> <span class="n">no</span>
    <span class="n">conda</span> <span class="n">build</span> <span class="o">.</span>
    </pre></div>
    </div>
    <p>Now, upload your test package to Anaconda Repository using the
    <a class="reference internal" href="cli.html#repo-cli-upload"><span class="std std-ref">anaconda-client upload</span></a> command.</p>
    <p>Adding the <code class="docutils literal"><span class="pre">--label</span></code> option tells Anaconda Repository to make the upload
    visible only to users who specify that label:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">upload</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">conda</span><span class="o">-</span><span class="n">package</span><span class="o">-</span><span class="mf">2.0</span><span class="o">.</span><span class="n">tar</span><span class="o">.</span><span class="n">bz2</span> <span class="o">--</span><span class="n">label</span> <span class="n">test</span>
    </pre></div>
    </div>
    <p>You will notice now that even when you search conda <code class="docutils literal"><span class="pre">main</span></code>, you won&#8217;t
    see the <code class="docutils literal"><span class="pre">2.0</span></code> version of the test package. This is because you have to
    tell conda to look for your new <code class="docutils literal"><span class="pre">test</span></code> label.</p>
    <p>The <code class="docutils literal"><span class="pre">--override</span></code> argument tells conda not to use any channels in your
    <code class="docutils literal"><span class="pre">~/.condarc</span></code> file.</p>
    <p>No 2.0 results:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">search</span> <span class="o">--</span><span class="n">override</span> <span class="o">-</span><span class="n">c</span> <span class="n">USERNAME</span> <span class="n">conda</span><span class="o">-</span><span class="n">package</span>
    </pre></div>
    </div>
    <p>Your 2.0 package is here:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">search</span> <span class="o">--</span><span class="n">override</span> <span class="o">-</span><span class="n">c</span> <span class="n">USERNAME</span><span class="o">/</span><span class="n">label</span><span class="o">/</span><span class="n">test</span> <span class="n">conda</span><span class="o">-</span><span class="n">package</span>
    </pre></div>
    </div>
    <p>You can give the label <code class="docutils literal"><span class="pre">USERNAME/label/test</span></code> to your testers. Once
    they finish testing, you may then want to copy the <code class="docutils literal"><span class="pre">test</span></code> packages
    back to your <code class="docutils literal"><span class="pre">main</span></code> label.</p>
    <p>You can also manage your package labels from your dashboard:
    <code class="docutils literal"><span class="pre">https://&lt;your-anaconda-repo&gt;/USERNAME/conda-package</span></code></p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span> <span class="n">label</span> <span class="o">--</span><span class="n">copy</span> <span class="n">test</span> <span class="n">main</span>
    </pre></div>
    </div>
    <p>Now your version 2.0 is in main:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">search</span> <span class="o">--</span><span class="n">override</span> <span class="o">-</span><span class="n">c</span> <span class="n">USERNAME</span> <span class="n">conda</span><span class="o">-</span><span class="n">package</span>
    </pre></div>
    </div>
    </div>
