Skip to main content

A ideia desse SDK é otimizar o tempo de código dos usuários auxiliando na integração com a plataforma.

Project description

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 Telegram Group

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

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

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

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

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apigratis-sdk-python-1.1.7.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

apigratis_sdk_python-1.1.7-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page