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

Uploaded Source

Built Distribution

scorb_api-0.1.3-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scorb_api-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3a91eded4312de5a2d59b32b74f66c4f7fb15b3b5e706c716499436640b5a486
MD5 942d46648af8d68bbe1d2f5391194a43
BLAKE2b-256 abae0273b47249959d837b0e9a1d10a30d567bd304764248b640595d55dd0308

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scorb_api-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for scorb_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 49ccff751692322b27eb0254f93c6cee4a61e3743bbefae6724063253cf47feb
MD5 d343828f028fa1459060fadf44b1827c
BLAKE2b-256 979b4efe9d7b91cc6b3d9f088667308d721e07e9d77c5370456cfd934ab12656

See more details on using hashes here.

Supported by

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