Skip to main content

Scorb API Client to execute READ methods on API

Project description

Scorb API

PyPI Latest Release

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


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.8.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scorb_api-0.1.8-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file scorb_api-0.1.8.tar.gz.

File metadata

  • Download URL: scorb_api-0.1.8.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for scorb_api-0.1.8.tar.gz
Algorithm Hash digest
SHA256 8e13317883a08dfd371a61cb9c9b8c6f3f134e1d3dca8a17448495fd6ba6dee6
MD5 f43b7afdeb6ec8275e52be5ff3057fc8
BLAKE2b-256 be11c9c6337ebb40e19417661a0b21f0ab9a28126d10fa3192f2e1da583cd7a7

See more details on using hashes here.

File details

Details for the file scorb_api-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: scorb_api-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for scorb_api-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1c75bcaabcadb447eb51be2a41f86a0a90dc14e6b9c1b052b74e222756109a02
MD5 1a104853f3f96b16ab0801a278752154
BLAKE2b-256 4aebc72416182f0fad98018e9101aba4a4969e726de81c48787ca25bd2540fa1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page