Scorb API Client to execute CRUD 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 create, update and delete 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.0.tar.gz
(10.3 kB
view hashes)
Built Distribution
scorb_api-0.1.0-py3-none-any.whl
(37.7 kB
view hashes)
Close
Hashes for scorb_api-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e458383657105d9caab51afbe8c3d4f24e5d1d9c0f31580f4dc7633c4533cc7a |
|
MD5 | a8c125f969fab269f8fc23033d48a355 |
|
BLAKE2b-256 | c6f55875b7f36fe95d9e6f0a57dcd88dc2ab2a041f82cd0a703243146b8641a3 |