societe-generale / pysgconnect

A python script to ease SG Connect integration for our clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:Apache License 2.0


Languages

Language:Python 100.0%