brynq-sdk-salesforce 2.0.2__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/PKG-INFO +1 -1
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce/salesforce.py +6 -7
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce.egg-info/PKG-INFO +1 -1
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce.egg-info/requires.txt +1 -1
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/setup.py +2 -2
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce/__init__.py +0 -0
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce.egg-info/not-zip-safe +0 -0
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce.egg-info/top_level.txt +0 -0
- {brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/setup.cfg +0 -0
{brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce/salesforce.py
RENAMED
|
@@ -3,7 +3,7 @@ import urllib.parse
|
|
|
3
3
|
import warnings
|
|
4
4
|
import requests
|
|
5
5
|
import json
|
|
6
|
-
from typing import Union, List
|
|
6
|
+
from typing import Union, List, Literal, Optional
|
|
7
7
|
import pandas as pd
|
|
8
8
|
import os
|
|
9
9
|
|
|
@@ -13,22 +13,21 @@ class Salesforce(BrynQ):
|
|
|
13
13
|
This class is meant to be a simple wrapper around the Salesforce API. In order to start using it, authorize your application is BrynQ.
|
|
14
14
|
You will receive a code which you can use to obtain a refresh token using the get_refresh_token method. Use this refresh token to refresh your access token always before you make a data call.
|
|
15
15
|
"""
|
|
16
|
-
def __init__(self,
|
|
16
|
+
def __init__(self, system_type: Optional[Literal['source', 'target']] = None, debug: bool = False, sandbox: bool = False):
|
|
17
17
|
super().__init__()
|
|
18
18
|
if sandbox:
|
|
19
19
|
self.system = 'salesforce-sandbox'
|
|
20
20
|
else:
|
|
21
21
|
self.system = 'salesforce'
|
|
22
|
-
|
|
23
|
-
self.
|
|
24
|
-
self.customer_url = self.credentials['
|
|
22
|
+
credentials = self.interfaces.credentials.get(system=self.system, system_type=system_type)
|
|
23
|
+
self.credentials = credentials.get('data')
|
|
24
|
+
self.customer_url = self.credentials['instance_url']
|
|
25
25
|
self.debug = debug
|
|
26
26
|
self.api_version = 56.0
|
|
27
27
|
self.timeout = 3600
|
|
28
28
|
|
|
29
29
|
def __get_headers(self) -> dict:
|
|
30
|
-
|
|
31
|
-
headers = {"Authorization": f"Bearer {credentials['access_token']}",
|
|
30
|
+
headers = {"Authorization": f"Bearer {self.credentials['access_token']}",
|
|
32
31
|
"Content-Type": "application/json"}
|
|
33
32
|
if self.debug:
|
|
34
33
|
print(f"Headers: {headers}")
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='brynq_sdk_salesforce',
|
|
5
|
-
version='
|
|
5
|
+
version='3.0.0',
|
|
6
6
|
description='Salesforce wrapper from BrynQ',
|
|
7
7
|
long_description='Salesforce wrapper from BrynQ',
|
|
8
8
|
author='BrynQ',
|
|
@@ -10,7 +10,7 @@ setup(
|
|
|
10
10
|
packages=find_namespace_packages(include=['brynq_sdk*']),
|
|
11
11
|
license='BrynQ License',
|
|
12
12
|
install_requires=[
|
|
13
|
-
'brynq-sdk-brynq>=
|
|
13
|
+
'brynq-sdk-brynq>=4,<5',
|
|
14
14
|
'requests>=2,<=3',
|
|
15
15
|
'pandas>=1,<3',
|
|
16
16
|
'pyarrow>=10'
|
|
File without changes
|
{brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{brynq_sdk_salesforce-2.0.2 → brynq_sdk_salesforce-3.0.0}/brynq_sdk_salesforce.egg-info/not-zip-safe
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|