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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scorb_api-0.1.7.tar.gz
Algorithm Hash digest
SHA256 feef481dbb9ffac61825b67be8266ac116c0f94f6679763d54b2586b2709cdf8
MD5 f5e7a75c863d7eb271f712613568e261
BLAKE2b-256 71ccc4f3e88ca51c258078c32bdc60c7d0ab671b550a6906a86cab840576a04b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for scorb_api-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b9731b73b7cf6b09fc64a3cae723d151a1291a60015dbe7e2d2f5af1ed0431d7
MD5 bf2b9c72a1970e002c1a4e8f65b47e09
BLAKE2b-256 2096a7b68c618eaec4c6a25fa187bbd8331c30cc15dd3f542cb6229086a133c3

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