Skip to content

Commit

Permalink
Deployed 564e342 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dunossauro committed Feb 3, 2024
1 parent 1fb9fdc commit a001a74
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions 01/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ <h2 id="criacao-do-projeto-fastapi-e-instalacao-das-dependencias">Criação do P
<ol>
<li>Essa era a maior versão do 3.11 quando escrevi</li>
</ol>
<p>Essa comando criará um arquivo oculto chamado <code>.python-version</code> na raiz do nosso projeto:</p>
<p>Esse comando criará um arquivo oculto chamado <code>.python-version</code> na raiz do nosso projeto:</p>
<div class="language-text highlight"><span class="filename">.python-version</span><pre><span></span><code><span id="__span-8-1"><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a>3.11.7
</span></code></pre></div>
<p>Esse arquivo fará com que toda vez que o terminal for aberto nesse diretório, o pyenv use a versão descrita no arquivo quando o python interpretador for chamado.</p>
Expand Down Expand Up @@ -1377,7 +1377,7 @@ <h3 id="ruff">Ruff</h3>
</span></code></pre></div></td></tr></table></div>
<details class="example" open="open">
<summary>Nota sobre "migrations"</summary>
<p>Em quase todas as ferramentas, nessa fase de configuração, excluiremos a pasta <code>migrations</code>, isso pode não fazer muito sentido nesse momento. Contudo, quando iniciarmos o trabalho com o banco de dados, a ferramenta <code>Alembic</code> faz geração de código automático. Por serem códigos gerados automaticamente, não queremos alterar a configuração feita per ela.</p>
<p>Em quase todas as ferramentas, nessa fase de configuração, excluiremos a pasta <code>migrations</code>, isso pode não fazer muito sentido nesse momento. Contudo, quando iniciarmos o trabalho com o banco de dados, a ferramenta <code>Alembic</code> faz geração de código automático. Por serem códigos gerados automaticamente, não queremos alterar a configuração feita por ela.</p>
</details>
<h3 id="isort">isort</h3>
<p><a href="https://pycqa.github.io/isort/" target="_blank">isort</a> é uma ferramenta para organizar os imports. Na PEP-8 existe uma regra de <a href="https://peps.python.org/pep-0008/#imports" target="_blank">precedência sobre os imports</a>. A função do isort é agrupar os imports e também ordená-los em ordem alfabética, para ajudar a buscar onde e o que foi importado.</p>
Expand All @@ -1398,7 +1398,7 @@ <h3 id="pytest">pytest</h3>
</span></code></pre></div></td></tr></table></div>
<h3 id="blue">blue</h3>
<p><a href="https://blue.readthedocs.io/en/latest/index.html#" target="_blank">Blue</a> é um formatador de código. A ideia por trás do uso de um formatador é simplesmente padronizar toda a escrita do código. Como, por exemplo, definimos strings entre <code>'</code> ou entre <code>"</code>? Quando a linha exceder a 79 caracteres, como faremos a quebra de linha? Se quebrarmos a linha, usaremos vírgula no último valor ou não? Com o foco de padronizar o código.</p>
<p>Configuraremos o blue para somente para excluir o caminho das migrações quando forem utilizadas:</p>
<p>Configuraremos o blue para somente excluir o caminho das migrações quando forem utilizadas:</p>
<div class="language-toml highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">pyproject.toml</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-25-34">34</a></span>
<span class="normal"><a href="#__codelineno-25-35">35</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-25-34"><a id="__codelineno-25-34" name="__codelineno-25-34"></a><span class="k">[tool.blue]</span>
</span><span id="__span-25-35"><a id="__codelineno-25-35" name="__codelineno-25-35"></a><span class="n">extend-exclude</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'(migrations/)'</span>
Expand Down Expand Up @@ -1426,7 +1426,7 @@ <h3 id="taskipy">Taskipy</h3>
<li>lint: executa o ruff para ver se não temos nenhum problema com o código e checa se estamos conforme a PEP-8</li>
<li>format: formata o código usando blue e isort</li>
<li>run: executa o servidor de desenvolvimento do FastAPI</li>
<li>pre_test: executa a camada de lint antes de executar os teste</li>
<li>pre_test: executa a camada de lint antes de executar os testes</li>
<li>test: executa os testes com pytest de forma verbosa (-vv) e adiciona nosso código como base de cobertura</li>
<li>post_test: gera um report de cobertura após os testes</li>
</ul>
Expand Down Expand Up @@ -1839,7 +1839,7 @@ <h2 id="conclusao">Conclusão</h2>

</span>
<nav>
dunossauro, Julio Formiga, Igor Ferreira, Lucas Mendes, Adorilson Bezerra
dunossauro, Julio Formiga, Marcelo Machado, Igor Ferreira, Lucas Mendes, Adorilson Bezerra
</nav>
</span>

Expand Down
8 changes: 4 additions & 4 deletions 02/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1639,9 +1639,9 @@ <h4 id="integrando-o-pydantic-com-o-fastapi">Integrando o Pydantic com o FastAPI
</span><span id="__span-17-4"><a id="__codelineno-17-4" name="__codelineno-17-4"></a>
</span><span id="__span-17-5"><a id="__codelineno-17-5" name="__codelineno-17-5"></a><span class="n">app</span> <span class="o">=</span> <span class="n">FastAPI</span><span class="p">()</span>
</span><span id="__span-17-6"><a id="__codelineno-17-6" name="__codelineno-17-6"></a>
</span><span id="__span-17-7"><a id="__codelineno-17-7" name="__codelineno-17-7"></a><span class="hll">
</span></span><span id="__span-17-8"><a id="__codelineno-17-8" name="__codelineno-17-8"></a><span class="nd">@app</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'/'</span><span class="p">,</span> <span class="n">status_code</span><span class="o">=</span><span class="mi">200</span><span class="p">,</span> <span class="n">response_model</span><span class="o">=</span><span class="n">Message</span><span class="p">)</span>
</span><span id="__span-17-9"><a id="__codelineno-17-9" name="__codelineno-17-9"></a><span class="k">def</span> <span class="nf">read_root</span><span class="p">():</span>
</span><span id="__span-17-7"><a id="__codelineno-17-7" name="__codelineno-17-7"></a>
</span><span id="__span-17-8"><a id="__codelineno-17-8" name="__codelineno-17-8"></a><span class="hll"><span class="nd">@app</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'/'</span><span class="p">,</span> <span class="n">status_code</span><span class="o">=</span><span class="mi">200</span><span class="p">,</span> <span class="n">response_model</span><span class="o">=</span><span class="n">Message</span><span class="p">)</span>
</span></span><span id="__span-17-9"><a id="__codelineno-17-9" name="__codelineno-17-9"></a><span class="k">def</span> <span class="nf">read_root</span><span class="p">():</span>
</span><span id="__span-17-10"><a id="__codelineno-17-10" name="__codelineno-17-10"></a> <span class="k">return</span> <span class="p">{</span><span class="s1">'message'</span><span class="p">:</span> <span class="s1">'Olá mundo'</span><span class="p">}</span>
</span></code></pre></div></td></tr></table></div>
<p>Com essa abordagem, ao iniciar o servidor (<code>task run</code>) e acessar a Swagger UI em <a href="http://127.0.0.1:8000/docs" target="_blank">http://127.0.0.1:8000/docs</a>, observamos uma evolução significativa na documentação. Um novo campo <code>Schemas</code> é exibido, destacando a estrutura do modelo <code>Message</code> que definimos:</p>
Expand Down Expand Up @@ -1684,7 +1684,7 @@ <h2 id="conclusao">Conclusão</h2>
<span class="md-icon" title="Última atualização">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2v1.8Z"/></svg>
</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">February 2, 2024</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">February 3, 2024</span>
</span>


Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ <h3 id="quem-vai-ministrar-essas-aulas">🦖 Quem vai ministrar essas aulas?</h3
</div>
<h2 id="revisao-e-contribuicoes"><img alt="🧐" class="twemoji" src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/svg/1f9d0.svg" title=":face_with_monocle:"> Revisão e contribuições</h2>
<p>Esse material contou com a revisão e contribuições inestimáveis de pessoas incríveis:</p>
<p><a href="https://github.com/adorilson" target="_blank">@adorilson</a>, <a href="https://github.com/alphabraga" target="_blank">@alphabraga</a>, <a href="https://github.com/bugelseif" target="_blank">@bugelseif</a>, <a href="https://github.com/gabrielhardcore" target="_blank">@gabrielhardcore</a>, <a href="https://github.com/gbpagano" target="_blank">@gbpagano</a>, <a href="https://github.com/henriqueccda" target="_blank">@henriqueccda</a>, <a href="https://github.com/henriquesebastiao" target="_blank">@henriquesebastiao</a>, <a href="https://github.com/ig0r-ferreira" target="_blank">@ig0r-ferreira</a>, <a href="https://github.com/ivansantiagojr" target="_blank">@ivansantiagojr</a>, <a href="https://github.com/jlplautz" target="_blank">@jlplautz</a>, <a href="https://github.com/julioformiga" target="_blank">@julioformiga</a>, <a href="https://github.com/lbmendes" target="_blank">@lbmendes</a>, <a href="http://github.com/lucasmpavelski" target="_blank">@lucasmpavelski</a>, <a href="https://github.com/matheusalmeida28" target="_blank">@matheusalmeida28</a>, <a href="https://github.com/me15degrees" target="_blank">@me15degrees</a>, <a href="https://github.com/ricardo-emanuel01" target="_blank">@ricardo-emanuel01</a>, <a href="https://github.com/rodbv" target="_blank">@rodbv</a>, <a href="https://github.com/rodrigosbarretos" target="_blank">@rodrigosbarretos</a>, <a href="https://github.com/taconi" target="_blank">@taconi</a>, <a href="https://github.com/vcwild" target="_blank">@vcwild</a>, <a href="https://github.com/williangl" target="_blank">@williangl</a></p>
<p><a href="https://github.com/adorilson" target="_blank">@adorilson</a>, <a href="https://github.com/alphabraga" target="_blank">@alphabraga</a>, <a href="https://github.com/bugelseif" target="_blank">@bugelseif</a>, <a href="https://github.com/gabrielhardcore" target="_blank">@gabrielhardcore</a>, <a href="https://github.com/gbpagano" target="_blank">@gbpagano</a>, <a href="https://github.com/henriqueccda" target="_blank">@henriqueccda</a>, <a href="https://github.com/henriquesebastiao" target="_blank">@henriquesebastiao</a>, <a href="https://github.com/ig0r-ferreira" target="_blank">@ig0r-ferreira</a>, <a href="https://github.com/ivansantiagojr" target="_blank">@ivansantiagojr</a>, <a href="https://github.com/jlplautz" target="_blank">@jlplautz</a>, <a href="https://github.com/julioformiga" target="_blank">@julioformiga</a>, <a href="https://github.com/lbmendes" target="_blank">@lbmendes</a>, <a href="http://github.com/lucasmpavelski" target="_blank">@lucasmpavelski</a>, <a href="https://github.com/matheusalmeida28" target="_blank">@matheusalmeida28</a>, <a href="https://github.com/me15degrees" target="_blank">@me15degrees</a>, <a href="https://github.com/mmaachado" target="_blank">@mmaachado</a>, <a href="https://github.com/ricardo-emanuel01" target="_blank">@ricardo-emanuel01</a>, <a href="https://github.com/rodbv" target="_blank">@rodbv</a>, <a href="https://github.com/rodrigosbarretos" target="_blank">@rodrigosbarretos</a>, <a href="https://github.com/taconi" target="_blank">@taconi</a>, <a href="https://github.com/vcwild" target="_blank">@vcwild</a>, <a href="https://github.com/williangl" target="_blank">@williangl</a></p>
<p><ins class="critic"><strong>Muito obrigado!</strong></ins> <img alt="" class="twemoji" src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/svg/2764.svg" title=":heart:"></p>
<h2 id="licenca">📖 Licença</h2>
<p>Todo esse curso foi escrito e produzido por Eduardo Mendes (<a href="https://dunossauro.com/" target="_blank">@dunossauro</a>).</p>
Expand Down Expand Up @@ -1144,7 +1144,7 @@ <h2 id="faq">F.A.Q.</h2>
<span class="md-icon" title="Última atualização">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2v1.8Z"/></svg>
</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">January 27, 2024</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">February 3, 2024</span>
</span>


Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,72 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://fastapidozero.dunossauro.com/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/01/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/02/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/03/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/04/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/05/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/06/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/07/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/08/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/09/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/10/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/11/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/12/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://fastapidozero.dunossauro.com/13/</loc>
<lastmod>2024-02-02</lastmod>
<lastmod>2024-02-03</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit a001a74

Please sign in to comment.