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.6.tar.gz (9.8 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.6-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scorb_api-0.1.6.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for scorb_api-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ef5f552356cd555e1b515eb786cd1f1486a4223124fba150d5c713d8b5813763
MD5 15ef1790e1ba75bb3005be1ee505ed37
BLAKE2b-256 1b40e15318e963904af664b4863259c9763d2520e92760e4c4ea46cc17549286

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scorb_api-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for scorb_api-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c93a9ce25e69490b27aeb3bc8a1959de2fed69dcc59ebbda57a8f6eca99896fb
MD5 ef32c6de992b9bb9811cd0c5abd4899e
BLAKE2b-256 3ee1b5c76c25593244845414f9a19aad35b01c3c7b7833502e47fca3648f05b9

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