Scorb API Client to execute READ methods on API
Project description
Scorb API
Use scorb functionalities in your python application.
Instalation
pip install scorb-api
Configuration
Environment variables
To use scorb-api, you need to set two environment variables:
# ---DOTENV EXAMPLE---
SCORB_USERNAME_API= # Username to authenticate
SCORB_PASSWORD_API= # Password to authenticate
SCORB_BASE_URL=https://scorb.com.br/ # Base path of your api instance
Usage Example
You can use scorb-api in order to read registers on all system tables.
List registers
You can use get methods to list registers of system table. See the following example:
from scorb_api import ScorbApiClient
# Instantiate ScorbApiClient client object
client = ScorbApiClient(company="your-company", app_name="your-app-name")
# Get the endpoint
cenario_endpoint = client.globais().cenario()
calculo_alcance_enpoint = client.entidades_de_cenario().calculo_alcance(
cenario_code="cenario_code"
)
custom_entity_enpoint = client.entidades_customizadas().entidade_customizada(
cenario_code="cenario_code", custom="custom_endpoint_name"
)
custom_table_endpoint = client.tabelas_customizadas().tabela_customizada(
cenario_code="cenario_code", custom="custom_endpoint_name"
)
# Read will return a list of objects from API.
cenarios_data = cenario_endpoint.read()
calculo_alcance_data = calculo_alcance_enpoint.read()
custom_entity_data = custom_entity_enpoint.read()
custom_table_data = custom_table_endpoint.read()
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
scorb_api-0.1.2.tar.gz
(9.3 kB
view hashes)
Built Distribution
scorb_api-0.1.2-py3-none-any.whl
(27.8 kB
view hashes)
Close
Hashes for scorb_api-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb260a658b9e1516a2224fed83dadef60af3ba88b56c8e01ce1e6714fc01cba7 |
|
MD5 | 66214d90d2cfff6facb4dc77e8952e5f |
|
BLAKE2b-256 | b0f97d839389ba8da2b993933274aa02f1fec61e695f2fecf67fa7a123aa9fac |