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.1.tar.gz
(10.4 kB
view hashes)
Built Distribution
scorb_api-0.1.1-py3-none-any.whl
(36.1 kB
view hashes)
Close
Hashes for scorb_api-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a5d441d6e13b38ad3d0ea76807e12a06e7a7cc5fa4ce7ed76a65d0f81e53042 |
|
MD5 | 9536f58eb4203b4ed15ea23b82415053 |
|
BLAKE2b-256 | b0399848bbce23136f5882e0e0465e45975fea0694d5a89bf73956e8f4fc618c |