Skip to content

A python script to ease SG Connect integration for our clients

License

Notifications You must be signed in to change notification settings

societe-generale/pysgconnect

Repository files navigation

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 .

About

A python script to ease SG Connect integration for our clients

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages