Metadata-Version: 2.1
Name: apigratis-sdk-python
Version: 1.1.7
Summary: A ideia desse SDK é otimizar o tempo de código dos usuários auxiliando na integração com a plataforma.
Home-page: https://github.com/APIBrasil/apigratis-sdk-python
Author: APIBRASIL
Author-email: APIBRASIL <contato@apibrasil.com.br>
License: MIT License
        
        Copyright (c) 2023 apigratis
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/APIBrasil/apigratis-sdk-python
Project-URL: Repository, https://github.com/APIBrasil/apigratis-sdk-python.git
Project-URL: Bug Tracker, https://github.com/APIBrasil/apigratis-sdk-python/issues
Keywords: python,package,build,tutorial
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.2
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"

# SDK Python - APIGratis by APIBrasil

Conjunto de API, para desenvolvedores.

_Transforme seus projetos em solucoes inteligentes com nossa API. Com recursos como API do WhatsApp, geolocalizacao, rastreamento de encomendas, verificacao de CPF/CNPJ e mais, voce pode criar solucoes eficientes e funcionais._

## Como instalar

```pip install apigratis-sdk-python```
## Canais de suporte (Comunidade)
[![WhatsApp Group](https://img.shields.io/badge/WhatsApp-Group-25D366?logo=whatsapp)](https://chat.whatsapp.com/KsPendingrUGIPWvUBYAjI1ogaGs)
[![Telegram Group](https://img.shields.io/badge/Telegram-Group-32AFED?logo=telegram)](https://t.me/apigratisoficial)

## Obtenha suas credenciais
https://apibrasil.com.br

## Mais informacoes

https://pypi.org/project/apigratis-sdk-python

## Servicos de API disponiveis

| Up  | Services available            | Description       | Free    | Beta        | Stable   |
------|-------------------------------|-------------------|---------| ------------------------- | ------------------------- |
| Yes | WhatsAppService                | API do WhatsApp                         |   Yes   | Yes                   | Yes                   |
| Yes | SMS                            | API de SMS              .               |   Yes   | Yes                   | Yes                   |
| Yes | Receita Data CNPJ              | API Dados CNPJ Receita.                 |   Yes   | Yes                   | Yes                   |
| Yes | Receita Data CPF               | API Dados de CPF Serasa.                |   Yes   | Yes                   | Yes                   |
| Yes | CorreiosService                | API Busca encomendas Correios Brazil.   |   Yes   | Yes                   | Yes                   |
| Yes | CEPLocation                    | API CEP Geolocation + IBGE Brazil.      |   Yes   | Yes                   | Yes                   |
| Yes | VehiclesService                | API Placa Dados.                        |   Yes   | Yes                   | Yes                   |
| Yes | FipeService                    | API Placa FIPE.                         |   Yes   | Yes                   | Yes                   |

## Como utilizar

_Voce pode utilizar todos os endpoints da API do WhatsApp, basta mudar o action e o body_

## Documentacoes
https://apibrasil.com.br/documentacoes

## WhatsApp Service

```python
from apigratis.Service import Service
import json

def whatsapp():

    #sendText
    sendText = Service().whatsapp(json.dumps({
        "action": "sendText",
        "credentials": {
            "DeviceToken": "SEU_DEVICE_TOKEN",
            "BearerToken": "SEU_BEARER_TOKEN",
        },
        "body": {
            "text": "Hello World for Python",
            "number": "5531994359434",
            "time_typing": 1
        }
    }))

    #sendFile
    sendFile = Service().whatsapp(json.dumps({
        "action": "sendFile",
        "credentials": {
            "DeviceToken": "SEU_DEVICE_TOKEN",
            "BearerToken": "SEU_BEARER_TOKEN",
        },
        "body":  {
            "number" : "5531994359434",
            "path" : "https://assets.nagios.com/downloads/nagiosxi/docs/Installing_The_XI_Linux_Agent.pdf",
            "options" : {
                "caption": "texto do caption para arquivo",
                "createChat": True,
                "filename": "arquivo X"
            }
        }
    }))

    print(sendFile)

if __name__ == "__main__":
    whatsapp()
```

## Vehicles Data Service

```python
from apigratis.Service import Service
import json

def vehicles():

    dados = Service().vehicles(json.dumps({
        "action": "dados",
        "credentials": {
            "DeviceToken": "SEU_DEVICE_TOKEN",
            "BearerToken": "SEU_BEARER_TOKEN",
        },
        "body":  {
            "placa": "OQH3A65"
        }
    }))

    print(dados)

if __name__ == "__main__":
    vehicles()
```

## Vehicles FIPE Service

```python
from apigratis.Service import Service
import json

def fipe():

    vehicle = Service().vehicles(json.dumps({
        "action": "fipe",
        "credentials": {
            "DeviceToken": "SEU_DEVICE_TOKEN",
            "BearerToken": "SEU_BEARER_TOKEN",
        },
        "body": {
            "placa": "OQH3065",
        }
    }))

    print(vehicle)

if __name__ == "__main__":
    fipe()
```

## Dados CNPJ Service

```python
from apigratis.Service import Service
import json

def cnpj():

    dados = Service().cnpj(json.dumps({
        "action": "cnpj",
        "credentials": {
            "DeviceToken": "SEU_DEVICE_TOKEN",
            "BearerToken": "SEU_BEARER_TOKEN",
        },
        "body": {
            "cnpj": "44.959.669/0001-80",
        }
    }))

    print(dados)

if __name__ == "__main__":
    cnpj()
```
