Files
kittycad.py/docs/html/_autosummary/kittycad.api.file.create_file_mass.asyncio.html
2023-07-08 02:27:32 +00:00

185 lines
15 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta property="og:title" content="kittycad.api.file.create_file_mass.asyncio" />
<meta property="og:type" content="website" />
<meta property="og:url" content="_autosummary/kittycad.api.file.create_file_mass.asyncio.html" />
<meta property="og:site_name" content="kittycad" />
<meta property="og:image:width" content="1146" />
<meta property="og:image:height" content="600" />
<meta property="og:image" content="/_images/social_previews/summary__autosummary_kittycad.api.file.create_file_mass.asyncio_8aa39d3e.png" />
<meta property="og:image:alt" content="" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>kittycad.api.file.create_file_mass.asyncio &mdash; kittycad v0.4.4 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
<link rel="stylesheet" href="../_static/copybutton.css" type="text/css" />
<link rel="stylesheet" href="../_static/autoclasstoc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="../_static/jquery.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/clipboard.min.js"></script>
<script src="../_static/copybutton.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="kittycad.api.file.create_file_mass.asyncio_detailed" href="kittycad.api.file.create_file_mass.asyncio_detailed.html" />
<link rel="prev" title="kittycad.api.file.create_file_mass" href="kittycad.api.file.create_file_mass.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
kittycad
</a>
<div class="version">
v0.4.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="kittycad.api.html">kittycad.api</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.ai.html">kittycad.api.ai</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.api_calls.html">kittycad.api.api_calls</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.api_tokens.html">kittycad.api.api_tokens</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.apps.html">kittycad.api.apps</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.beta.html">kittycad.api.beta</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.constant.html">kittycad.api.constant</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.executor.html">kittycad.api.executor</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="kittycad.api.file.html">kittycad.api.file</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="kittycad.api.file.create_file_center_of_mass.html">kittycad.api.file.create_file_center_of_mass</a></li>
<li class="toctree-l3"><a class="reference internal" href="kittycad.api.file.create_file_conversion.html">kittycad.api.file.create_file_conversion</a></li>
<li class="toctree-l3"><a class="reference internal" href="kittycad.api.file.create_file_conversion_with_base64_helper.html">kittycad.api.file.create_file_conversion_with_base64_helper</a></li>
<li class="toctree-l3"><a class="reference internal" href="kittycad.api.file.create_file_density.html">kittycad.api.file.create_file_density</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="kittycad.api.file.create_file_mass.html">kittycad.api.file.create_file_mass</a><ul class="current">
<li class="toctree-l4 current"><a class="current reference internal" href="#">kittycad.api.file.create_file_mass.asyncio</a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.asyncio_detailed.html">kittycad.api.file.create_file_mass.asyncio_detailed</a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.sync.html">kittycad.api.file.create_file_mass.sync</a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.sync_detailed.html">kittycad.api.file.create_file_mass.sync_detailed</a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.html#kittycad.api.file.create_file_mass._build_response"><code class="docutils literal notranslate"><span class="pre">_build_response()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.html#kittycad.api.file.create_file_mass._get_kwargs"><code class="docutils literal notranslate"><span class="pre">_get_kwargs()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.html#kittycad.api.file.create_file_mass._parse_response"><code class="docutils literal notranslate"><span class="pre">_parse_response()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.html#kittycad.api.file.create_file_mass.asyncio"><code class="docutils literal notranslate"><span class="pre">asyncio()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.html#kittycad.api.file.create_file_mass.asyncio_detailed"><code class="docutils literal notranslate"><span class="pre">asyncio_detailed()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.html#kittycad.api.file.create_file_mass.sync"><code class="docutils literal notranslate"><span class="pre">sync()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="kittycad.api.file.create_file_mass.html#kittycad.api.file.create_file_mass.sync_detailed"><code class="docutils literal notranslate"><span class="pre">sync_detailed()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="kittycad.api.file.create_file_surface_area.html">kittycad.api.file.create_file_surface_area</a></li>
<li class="toctree-l3"><a class="reference internal" href="kittycad.api.file.create_file_volume.html">kittycad.api.file.create_file_volume</a></li>
<li class="toctree-l3"><a class="reference internal" href="kittycad.api.file.get_file_conversion_with_base64_helper.html">kittycad.api.file.get_file_conversion_with_base64_helper</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.hidden.html">kittycad.api.hidden</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.meta.html">kittycad.api.meta</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.modeling.html">kittycad.api.modeling</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.oauth2.html">kittycad.api.oauth2</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.payments.html">kittycad.api.payments</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.unit.html">kittycad.api.unit</a></li>
<li class="toctree-l2"><a class="reference internal" href="kittycad.api.users.html">kittycad.api.users</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="kittycad.client.html">kittycad.client</a></li>
<li class="toctree-l1"><a class="reference internal" href="kittycad.models.html">kittycad.models</a></li>
<li class="toctree-l1"><a class="reference internal" href="kittycad.types.html">kittycad.types</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">kittycad</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="kittycad.api.html">kittycad.api</a></li>
<li class="breadcrumb-item"><a href="kittycad.api.file.html">kittycad.api.file</a></li>
<li class="breadcrumb-item"><a href="kittycad.api.file.create_file_mass.html">kittycad.api.file.create_file_mass</a></li>
<li class="breadcrumb-item active">kittycad.api.file.create_file_mass.asyncio</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="kittycad-api-file-create-file-mass-asyncio">
<h1>kittycad.api.file.create_file_mass.asyncio<a class="headerlink" href="#kittycad-api-file-create-file-mass-asyncio" title="Permalink to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="kittycad.api.file.create_file_mass.asyncio">
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">kittycad.api.file.create_file_mass.</span></span><span class="sig-name descname"><span class="pre">asyncio</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">material_density</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">src_format</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">body</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">client</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/kittycad/kittycad.py/kittycad/api/file/create_file_mass.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="reference internal" href="../_modules/kittycad/api/file/create_file_mass.html#asyncio"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#kittycad.api.file.create_file_mass.asyncio" title="Permalink to this definition"></a></dt>
<dd><p>We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the <cite>id</cite> of the operation will be returned. You can use the <cite>id</cite> returned from the request to get status information about the async operation from the <cite>/async/operations/{id}</cite> endpoint.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Union" title="(in Python v3.11)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code></a>[<a class="reference internal" href="kittycad.models.file_mass.FileMass.html#kittycad.models.file_mass.FileMass" title="kittycad.models.file_mass.FileMass"><code class="xref py py-class docutils literal notranslate"><span class="pre">FileMass</span></code></a>, <a class="reference internal" href="kittycad.models.error.Error.html#kittycad.models.error.Error" title="kittycad.models.error.Error"><code class="xref py py-class docutils literal notranslate"><span class="pre">Error</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.11)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></a>]</p>
</dd>
</dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="kittycad.api.file.create_file_mass.html" class="btn btn-neutral float-left" title="kittycad.api.file.create_file_mass" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="kittycad.api.file.create_file_mass.asyncio_detailed.html" class="btn btn-neutral float-right" title="kittycad.api.file.create_file_mass.asyncio_detailed" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2023, KittyCAD Team Members.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>