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)
Obtenha suas credenciais
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for apigratis-sdk-python-1.1.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | edb288631b3e3b887197f656bb789e115c5bd4eaaa5a75715bb36e811381f32b |
|
MD5 | 5ba6ce3b617a0354344882163f3c52fc |
|
BLAKE2b-256 | 32765dd11b26d2a0ccd2f70e9d9852b6953bf92529c07f277850f736889df393 |
Close
Hashes for apigratis_sdk_python-1.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f6e18f638dec2bbe5fb6153987f0d9143792f7c95bbf6ef37ff7c741f65069e |
|
MD5 | 0f3793aa3e2398999454809ec53b4ee0 |
|
BLAKE2b-256 | 14133da1e824c2c0cc8b201521d3ea06ff7b580ad415c9692fc0b15c045aca71 |