tabela-sac
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

``` sh
pip install tabela_sac
```

## How to use

``` python
from tabela_sac.core import SACCalculator
```

``` python
sac = SACCalculator(valor_financiado=200000, 
                    prazo=360, 
                    taxa_juros=0.01)
```

``` python
tabela = sac.tabela()
```

``` python
tabela
```

<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>Parcela</th>
      <th>Juros</th>
      <th>Amortização</th>
      <th>Valor da Parcela</th>
      <th>Saldo Devedor</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>1</td>
      <td>2000.00</td>
      <td>555.56</td>
      <td>2555.56</td>
      <td>199444.44</td>
    </tr>
    <tr>
      <th>1</th>
      <td>2</td>
      <td>1994.44</td>
      <td>555.56</td>
      <td>2550.00</td>
      <td>198888.89</td>
    </tr>
    <tr>
      <th>2</th>
      <td>3</td>
      <td>1988.89</td>
      <td>555.56</td>
      <td>2544.44</td>
      <td>198333.33</td>
    </tr>
    <tr>
      <th>3</th>
      <td>4</td>
      <td>1983.33</td>
      <td>555.56</td>
      <td>2538.89</td>
      <td>197777.78</td>
    </tr>
    <tr>
      <th>4</th>
      <td>5</td>
      <td>1977.78</td>
      <td>555.56</td>
      <td>2533.33</td>
      <td>197222.22</td>
    </tr>
    <tr>
      <th>...</th>
      <td>...</td>
      <td>...</td>
      <td>...</td>
      <td>...</td>
      <td>...</td>
    </tr>
    <tr>
      <th>355</th>
      <td>356</td>
      <td>27.78</td>
      <td>555.56</td>
      <td>583.33</td>
      <td>2222.22</td>
    </tr>
    <tr>
      <th>356</th>
      <td>357</td>
      <td>22.22</td>
      <td>555.56</td>
      <td>577.78</td>
      <td>1666.67</td>
    </tr>
    <tr>
      <th>357</th>
      <td>358</td>
      <td>16.67</td>
      <td>555.56</td>
      <td>572.22</td>
      <td>1111.11</td>
    </tr>
    <tr>
      <th>358</th>
      <td>359</td>
      <td>11.11</td>
      <td>555.56</td>
      <td>566.67</td>
      <td>555.56</td>
    </tr>
    <tr>
      <th>359</th>
      <td>360</td>
      <td>5.56</td>
      <td>555.56</td>
      <td>561.11</td>
      <td>0.00</td>
    </tr>
  </tbody>
</table>
<p>360 rows × 5 columns</p>
</div>

# CLI Interface

The nbdev cli system uses `fastcore.script` to build command line
interfaces. For further information, go to
<https://fastcore.fast.ai/script.html>

``` sh
$ gerar_tabela_sac --help

usage: gerar_tabela_sac [-h] [--path PATH] valor_financiado prazo taxa_juros

Gera a tabela SAC para o valor financiado, prazo e taxa de juros informados.

positional arguments:
  valor_financiado  Valor financiado
  prazo             Prazo em meses
  taxa_juros        Taxa de juros ao mês (ex: 0.01 para uma taxa de 1% ao mês)

optional arguments:
  -h, --help        show this help message and exit
  --path PATH       (default: .)
```

Usage:

``` sh
$ gerar_tabela_sac 100000 360 0.01
```
