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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scorb_api-0.1.4.tar.gz.
File metadata
- Download URL: scorb_api-0.1.4.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942530cfd7cc291ea4c2fd3e04d908e435d8d99aa7ebb0bb6314dcb9f0c751d1
|
|
| MD5 |
a54b9a98d238be524a9add30f658ca42
|
|
| BLAKE2b-256 |
4fc116404f0f5c8335d5ae17aba8f04bbb401e5670cf5c4eccca975ad75a88dd
|
File details
Details for the file scorb_api-0.1.4-py3-none-any.whl.
File metadata
- Download URL: scorb_api-0.1.4-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a52b8e335f867cd8099f34de0049d752446e4abb3d7d69682f1354e014caaabb
|
|
| MD5 |
c19f6be2461c8fc1fd1e9e92ef6eb6b7
|
|
| BLAKE2b-256 |
69c27edf1eaa6597a35277ee14bc4b14c2f3c0b6529b7e26269e8d18ecaddac1
|