> ## 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.

# repartition_graph

<div className="kinetica-pydoc">
  <div className="dl py method">
    <div className="dt sig sig-object py" id="gpudb.GPUdb.repartition_graph"> <span className="sig-name descname"><span className="pre">repartition\_graph</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">graph\_name</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#L37262"><span className="viewcode-link"><span className="pre">\[source]</span></span></a></div>

    <div className="dd">
      <p>Rebalances an existing partitioned graph.</p>
      <p>IMPORTANT: It’s highly recommended that you review the <a className="reference external" href="/content/graph_solver/network_graph_solver/">Graphs and Solvers</a> concepts documentation, the <a className="reference external" href="/content/guides/graph_rest_guide/">Graph REST Tutorial</a>, and/or some <a className="reference external" href="/content/guides/tags/graph">graph examples</a> before using this endpoint.</p>
      <p><strong>Parameters</strong></p>

      <div className="blockquote">
        <div>
          <div className="dl">
            <div className="dt">graph\_name (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Name of the graph resource to rebalance.</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 className="simple">
                <li>
                  <p><strong>new\_graph\_name</strong> – If a non-empty value is specified, the original graph will be kept (non-default behavior) and a new balanced graph will be created under this given name. When the value is empty (default), the generated ‘balanced’ graph will replace the original ‘unbalanced’ graph under the same graph name. The default value is ‘’.</p>
                </li>

                <li>
                  <p><strong>source\_node</strong> – The distributed shortest path solve is run from this source node to all the nodes in the graph to create balanced partitions using the iso-distance levels of the solution. The source node is selected by the rebalance algorithm automatically (default case when the value is an empty string). Otherwise, the user specified node is used as the source. The default value is ‘’.</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">result (<span className="em">bool</span>) –</div>

            <div className="dd">
              <p>Indicates a successful rebalancing on all servers.</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>
