Skip to main content

Utilities to interact with SGConnect

Project description

pysgconnect

Python package to interact with SGConnect

Install

You can install this package by using Pypi:

pip install pysgconnect

Usage

Protect HTTP requests

from pysgconnect import SGConnectAuth
from requests import Session

session = Session()
# Do not hardcode your credential directly in your scripts, use a secure Vault solution instead
client_id = 
client_secret =

session.auth = SGConnectAuth(client_id, client_secret, scopes=['myscope'], env='PRD')

request = session.get('https://api.sgmarkets.com/foo/v1/bar')

Corporate proxy

By default, no proxies are configured.

proxies = {'https': '...', 'http': '...'}
session.auth = SGConnectAuth(client_id, client_secret, scopes=['...'], proxies=proxies)

Development

pip install -e .

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

pysgconnect-2.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

pysgconnect-2.3-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file pysgconnect-2.3.tar.gz.

File metadata

  • Download URL: pysgconnect-2.3.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pysgconnect-2.3.tar.gz
Algorithm Hash digest
SHA256 d564b3aab1a24f93648d73fa693b57c8c2b4a9835b9a8cbf9a38a1c4cc1b4895
MD5 4767fb75971b821a052024982b214cb4
BLAKE2b-256 a1e4ac20558e70ec58e69ac54b8a28063f65f8b9d4c66a555954b6344f5b7e25

See more details on using hashes here.

File details

Details for the file pysgconnect-2.3-py3-none-any.whl.

File metadata

  • Download URL: pysgconnect-2.3-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pysgconnect-2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 498d5c14904c5627c5ddb0de3614a47ca4b6876f907907f923200065973cda8d
MD5 eeb2091b391e861a8481763d2972ae2c
BLAKE2b-256 ca1b58120cb1fd3d63ef28dbb0e7f5d09884751664f43161a7735876ac2ace99

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