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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pysgconnect-2.2.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysgconnect-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for pysgconnect-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3783430c7ce6fa1a187e85c3d55d86a9fda53df0e0b84278d03480f71ca88c33
MD5 0774034a583ddacd0093c8a8bba4c401
BLAKE2b-256 e357edeea0ea4bf91512b53ffc8741dafc8fb4850bf69bcc1814a6120d0cda7f

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