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.9.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.9-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scorb_api-0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 81836c10e358d7b7fbe7116a5449027908a4172c76397d5feb56a83e3e1ae948
MD5 3c7fb8d9cb600f1fb49e51f56f30bfdd
BLAKE2b-256 2bf9b1cdbb076743716b1ebe6e09df81f0d7b598ae164f3e80ad9788f396bbe7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scorb_api-0.1.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 6a8ab7329e641b92e0446314117f42b3bbfcbefe103feadea2f5eb293f5271cb
MD5 6a80965eac2bb9cf4b5d48a1e3e8dda3
BLAKE2b-256 a8c0e7e5e16469f85b1eb0fa91a3590e3f44af584ab737b43c9e394a10b2d472

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