> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# download_files

<div className="kinetica-pydoc">
  <div className="dl py method">
    <div className="dt sig sig-object py" id="gpudb.GPUdb.download_files"> <span className="sig-name descname"><span className="pre">download\_files</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">file\_names</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">read\_offsets</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">read\_lengths</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span><a href="https://github.com/kineticadb/kinetica-api-python/blob/master/gpudb/gpudb.py#L26852"><span className="viewcode-link"><span className="pre">\[source]</span></span></a></div>

    <div className="dd">
      <p>Downloads one or more files from <a className="reference external" href="/content/tools/kifs/">KiFS</a>.</p>
      <p><strong>Parameters</strong></p>

      <div className="blockquote">
        <div>
          <div className="dl">
            <div className="dt">file\_names (<span className="em">list of str</span>) –</div>

            <div className="dd">
              <p>An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter.</p>
              <p>Accepted wildcard characters are asterisk (\*) to represent any string of zero or more characters, and question mark (?) to indicate a single character. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
            </div>

            <div className="dt">read\_offsets (<span className="em">list of longs</span>) –</div>

            <div className="dd">
              <p>An array of starting byte offsets from which to read each respective file in input parameter <span className="em">file\_names</span>. Must either be empty or the same length as input parameter <span className="em">file\_names</span>. If empty, files are downloaded in their entirety. If not empty, input parameter <span className="em">read\_lengths</span> must also not be empty. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
            </div>

            <div className="dt">read\_lengths (<span className="em">list of longs</span>) –</div>

            <div className="dd">
              <p>Array of number of bytes to read from each respective file in input parameter <span className="em">file\_names</span>. Must either be empty or the same length as input parameter <span className="em">file\_names</span>. If empty, files are downloaded in their entirety. If not empty, input parameter <span className="em">read\_offsets</span> must also not be empty. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
            </div>

            <div className="dt">options (<span className="em">dict of str to str</span>) –</div>

            <div className="dd">
              <p>Optional parameters. Allowed keys are:</p>

              <ul>
                <li>
                  <p><strong>file\_encoding</strong> – Encoding to be applied to the output file data. When using JSON serialization it is recommended to specify this as <span className="em">base64</span>. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p><strong>base64</strong> – Apply base64 encoding to the output file data.</p>
                    </li>

                    <li>
                      <p><strong>none</strong> – Do not apply any encoding to the output file data.</p>
                    </li>
                  </ul>

                  <p>The default value is ‘none’.</p>
                </li>
              </ul>

              <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
            </div>
          </div>
        </div>
      </div>

      <p><strong>Returns</strong></p>

      <div className="blockquote">
        <div>
          <p>A dict with the following entries–</p>

          <div className="dl simple">
            <div className="dt">file\_names (<span className="em">list of str</span>) –</div>

            <div className="dd">
              <p>Names of the files downloaded from KiFS.</p>
            </div>

            <div className="dt">file\_data (<span className="em">list of bytes</span>) –</div>

            <div className="dd">
              <p>Data for the respective downloaded files listed in output parameter <span className="em">file\_names</span>.</p>
            </div>

            <div className="dt">info (<span className="em">dict of str to str</span>) –</div>

            <div className="dd">
              <p>Additional information.</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
