cc-py-commons 0.4.9__tar.gz → 0.5.1__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.
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/PKG-INFO +1 -1
- {cc_py_commons-0.4.9/cc_py_commons/db → cc_py_commons-0.5.1/cc_py_commons/rfp}/create_table.py +1 -1
- cc_py_commons-0.5.1/cc_py_commons/services/c4/get_account_settings.py +21 -0
- cc_py_commons-0.5.1/cc_py_commons/services/mercury/get_lane_price.py +52 -0
- cc_py_commons-0.5.1/cc_py_commons/utils/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons.egg-info/PKG-INFO +1 -1
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons.egg-info/SOURCES.txt +4 -2
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/setup.py +1 -1
- cc_py_commons-0.4.9/cc_py_commons/services/mercury/get_lane_price.py +0 -23
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/README.md +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/bids/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/bids/bid.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/bids/bid_history.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/bids/bid_history_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/bids/bid_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/carriers/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/carriers/account_carrier_map.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/carriers/account_carrier_map_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/carriers/carrier.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/carriers/carrier_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/carriers/contact.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/carriers/contact_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/config/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/config/env.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/config/mcleod_load_fields.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/config/pc_miler_config.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/db/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/db/connection.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/geolocate.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/lanes/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/lanes/carrier_lane.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/lanes/carrier_lane_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/lanes/lane.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/lanes/lane_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/equipment.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/equipment_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/equipment_types.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/freighthub_contact.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/freighthub_contact_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/load.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/load_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/load_status.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/location.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/location_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/map_load_response.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/quotes/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/quotes/quote.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/quotes/quote_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/quotes/quote_status.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/rfp/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/rfp/lane_price_result_fields.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/rfp/price_lane_file_input_fields.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/rfp/rfp_status.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/schemas/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/schemas/camel_case_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/accept_bid.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/cancel_bid.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/constants.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/counter_bid.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/decline_bid.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/get_bid_by_amazon_order_id.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/get_quote.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/update_bid.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/amazon_session_token.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/constants.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/get_account.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/get_integration.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/get_users_for_account.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/refresh_amazon_token.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/get_carrier.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/list_carriers.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/list_contacts.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/update_contact.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/freight_hub/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/freight_hub/post_freight_hub_load.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/create_account_folder.py +0 -0
- {cc_py_commons-0.4.9/cc_py_commons/services/slack → cc_py_commons-0.5.1/cc_py_commons/services/mercury/db}/__init__.py +0 -0
- {cc_py_commons-0.4.9/cc_py_commons → cc_py_commons-0.5.1/cc_py_commons/services/mercury}/db/delete_table.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/get_client.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/get_green_screens_lane_price.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/get_import_stat.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/get_lane_price_for_bulk.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/list_clients.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/post_import_stat.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/update_import_stat.py +0 -0
- {cc_py_commons-0.4.9/cc_py_commons/sns → cc_py_commons-0.5.1/cc_py_commons/services/slack}/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/slack/send_slack_message.py +0 -0
- {cc_py_commons-0.4.9/cc_py_commons/sns/booking_agent → cc_py_commons-0.5.1/cc_py_commons/sns}/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/book_load_notification.py +0 -0
- {cc_py_commons-0.4.9/cc_py_commons/sqs → cc_py_commons-0.5.1/cc_py_commons/sns/booking_agent}/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/booking_agent/bid_counter_failure_notification.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/booking_agent/constants.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/booking_agent/send_sns_notification.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/booking_assistant_flow_notification.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/import_movements_notification.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/parsed_carrier_notification.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/sns_service.py +0 -0
- {cc_py_commons-0.4.9/cc_py_commons/tests → cc_py_commons-0.5.1/cc_py_commons/sqs}/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sqs/booking_assistant_flow_event.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sqs/sqs_service.py +0 -0
- {cc_py_commons-0.4.9/cc_py_commons/transactions → cc_py_commons-0.5.1/cc_py_commons/tests}/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/tests/test_case_conversion.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/tests/test_lambda_utils.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/tests/test_map_transaction.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/tests/test_temperature_utils.py +0 -0
- {cc_py_commons-0.4.9/cc_py_commons/utils → cc_py_commons-0.5.1/cc_py_commons/transactions}/__init__.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/equipment_clas_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/equipment_class.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/equipment_mapping.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/equipment_mapping_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/map_transaction.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/transaction.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/transaction_schema.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/case_conversion.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/datadog_logger.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/datetimes.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/dimension_utils.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/get_delivery_date.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/json_logger.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/lambda_utils.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/local_file.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/logger.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/logger_v2.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/pc_miler_utils.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/price_utils.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/redis.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/s3_file.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/utils/temperature_utils.py +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons.egg-info/dependency_links.txt +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons.egg-info/requires.txt +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons.egg-info/top_level.txt +0 -0
- {cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/setup.cfg +0 -0
{cc_py_commons-0.4.9/cc_py_commons/db → cc_py_commons-0.5.1/cc_py_commons/rfp}/create_table.py
RENAMED
@@ -6,7 +6,7 @@ def execute(table_name):
|
|
6
6
|
try:
|
7
7
|
conn = db_connection.get()
|
8
8
|
cursor = conn.cursor()
|
9
|
-
sql_query = f"CREATE TABLE {table_name} (search_result text)"
|
9
|
+
sql_query = f"CREATE TABLE {table_name} (search_result text, error text)"
|
10
10
|
cursor.execute(sql_query)
|
11
11
|
conn.commit()
|
12
12
|
finally:
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import requests
|
2
|
+
|
3
|
+
from cc_py_commons.utils.logger_v2 import logger
|
4
|
+
from .constants import C4_API_AUTH_TOKEN, C4_API_URL
|
5
|
+
|
6
|
+
|
7
|
+
def execute(user_id):
|
8
|
+
url = f"{C4_API_URL}/api/v1/user/{user_id}/accountSettings"
|
9
|
+
token = f"Bearer {C4_API_AUTH_TOKEN}"
|
10
|
+
headers = {
|
11
|
+
"Authorization": token
|
12
|
+
}
|
13
|
+
logger.debug(f"Getting account settings: URL: {url}, Headers: {headers}")
|
14
|
+
|
15
|
+
response = requests.get(url, headers=headers)
|
16
|
+
|
17
|
+
if response.status_code != 200:
|
18
|
+
logger.warning(f"Request to get account settings failed with status code: {response.status_code}")
|
19
|
+
return None
|
20
|
+
|
21
|
+
return response.json().get('data')
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import os
|
2
|
+
import requests
|
3
|
+
|
4
|
+
from cc_py_commons.utils.logger_v2 import logger
|
5
|
+
|
6
|
+
MERCURY_URL = os.environ.get("MERCURY_URL")
|
7
|
+
MERCURY_TOKEN = os.environ.get("MERCURY_TOKEN")
|
8
|
+
|
9
|
+
|
10
|
+
'''
|
11
|
+
Either returns lane price data or None.
|
12
|
+
This does not provide error details to the consumer in case the lookup fails.
|
13
|
+
'''
|
14
|
+
def execute(params):
|
15
|
+
url = f"{MERCURY_URL}/lanePricing"
|
16
|
+
token = f"Bearer {MERCURY_TOKEN}"
|
17
|
+
headers = {
|
18
|
+
"Authorization": token
|
19
|
+
}
|
20
|
+
response = requests.get(url, params=params, headers=headers)
|
21
|
+
|
22
|
+
if response.status_code != 200:
|
23
|
+
logger.warning(
|
24
|
+
f"Lane Pricing lookup failed for params: {params} - {response.status_code}:{response.text}")
|
25
|
+
return None
|
26
|
+
|
27
|
+
return response.json()
|
28
|
+
|
29
|
+
'''
|
30
|
+
Returns a dict with data and error key.
|
31
|
+
data refers to the lane price data if the price was generated.
|
32
|
+
error contains the stringified status code and text of Mercury response in case the lookup failed.
|
33
|
+
'''
|
34
|
+
def execute_v2(params):
|
35
|
+
result = {
|
36
|
+
'data': None,
|
37
|
+
'error': None
|
38
|
+
}
|
39
|
+
url = f"{MERCURY_URL}/lanePricing"
|
40
|
+
token = f"Bearer {MERCURY_TOKEN}"
|
41
|
+
headers = {
|
42
|
+
"Authorization": token
|
43
|
+
}
|
44
|
+
response = requests.get(url, params=params, headers=headers)
|
45
|
+
|
46
|
+
if response.status_code != 200:
|
47
|
+
error = f'{response.status_code}:{response.text}'
|
48
|
+
result['error'] = error
|
49
|
+
logger.warning(f"Lane Pricing lookup failed for params: {params} - {error}")
|
50
|
+
else:
|
51
|
+
result['data'] = response.json()
|
52
|
+
return result
|
File without changes
|
@@ -25,8 +25,6 @@ cc_py_commons/config/mcleod_load_fields.py
|
|
25
25
|
cc_py_commons/config/pc_miler_config.py
|
26
26
|
cc_py_commons/db/__init__.py
|
27
27
|
cc_py_commons/db/connection.py
|
28
|
-
cc_py_commons/db/create_table.py
|
29
|
-
cc_py_commons/db/delete_table.py
|
30
28
|
cc_py_commons/lanes/__init__.py
|
31
29
|
cc_py_commons/lanes/carrier_lane.py
|
32
30
|
cc_py_commons/lanes/carrier_lane_schema.py
|
@@ -49,6 +47,7 @@ cc_py_commons/quotes/quote.py
|
|
49
47
|
cc_py_commons/quotes/quote_schema.py
|
50
48
|
cc_py_commons/quotes/quote_status.py
|
51
49
|
cc_py_commons/rfp/__init__.py
|
50
|
+
cc_py_commons/rfp/create_table.py
|
52
51
|
cc_py_commons/rfp/lane_price_result_fields.py
|
53
52
|
cc_py_commons/rfp/price_lane_file_input_fields.py
|
54
53
|
cc_py_commons/rfp/rfp_status.py
|
@@ -68,6 +67,7 @@ cc_py_commons/services/c4/__init__.py
|
|
68
67
|
cc_py_commons/services/c4/amazon_session_token.py
|
69
68
|
cc_py_commons/services/c4/constants.py
|
70
69
|
cc_py_commons/services/c4/get_account.py
|
70
|
+
cc_py_commons/services/c4/get_account_settings.py
|
71
71
|
cc_py_commons/services/c4/get_integration.py
|
72
72
|
cc_py_commons/services/c4/get_users_for_account.py
|
73
73
|
cc_py_commons/services/c4/refresh_amazon_token.py
|
@@ -88,6 +88,8 @@ cc_py_commons/services/mercury/get_lane_price_for_bulk.py
|
|
88
88
|
cc_py_commons/services/mercury/list_clients.py
|
89
89
|
cc_py_commons/services/mercury/post_import_stat.py
|
90
90
|
cc_py_commons/services/mercury/update_import_stat.py
|
91
|
+
cc_py_commons/services/mercury/db/__init__.py
|
92
|
+
cc_py_commons/services/mercury/db/delete_table.py
|
91
93
|
cc_py_commons/services/slack/__init__.py
|
92
94
|
cc_py_commons/services/slack/send_slack_message.py
|
93
95
|
cc_py_commons/sns/__init__.py
|
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
|
|
3
3
|
setup(
|
4
4
|
name='cc_py_commons',
|
5
5
|
description='Common code for microservices',
|
6
|
-
version='0.
|
6
|
+
version='0.5.1',
|
7
7
|
url='https://github.com/Cargo-Chief/py-commons',
|
8
8
|
author='CargoChief',
|
9
9
|
author_email='engineering@cargochief.com',
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import requests
|
3
|
-
|
4
|
-
from cc_py_commons.utils.logger_v2 import logger
|
5
|
-
|
6
|
-
MERCURY_URL = os.environ.get("MERCURY_URL")
|
7
|
-
MERCURY_TOKEN = os.environ.get("MERCURY_TOKEN")
|
8
|
-
|
9
|
-
|
10
|
-
def execute(params):
|
11
|
-
url = f"{MERCURY_URL}/lanePricing"
|
12
|
-
token = f"Bearer {MERCURY_TOKEN}"
|
13
|
-
headers = {
|
14
|
-
"Authorization": token
|
15
|
-
}
|
16
|
-
response = requests.get(url, params=params, headers=headers)
|
17
|
-
|
18
|
-
if response.status_code != 200:
|
19
|
-
logger.warning(
|
20
|
-
f"Lane Pricing lookup failed for params: {params} - {response.status_code}:{response.text}")
|
21
|
-
return None
|
22
|
-
|
23
|
-
return response.json()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/carriers/account_carrier_map_schema.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/loads/freighthub_contact_schema.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/rfp/price_lane_file_input_fields.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/__init__.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/accept_bid.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/cancel_bid.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/constants.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/counter_bid.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/decline_bid.py
RENAMED
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/get_quote.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/booking_agent/update_bid.py
RENAMED
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/amazon_session_token.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/get_users_for_account.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/c4/refresh_amazon_token.py
RENAMED
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/get_carrier.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/list_carriers.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/list_contacts.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/carrier_hub/update_contact.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/create_account_folder.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/get_import_stat.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/post_import_stat.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/mercury/update_import_stat.py
RENAMED
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/services/slack/send_slack_message.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/booking_agent/send_sns_notification.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/booking_assistant_flow_notification.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/import_movements_notification.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sns/parsed_carrier_notification.py
RENAMED
File without changes
|
File without changes
|
{cc_py_commons-0.4.9/cc_py_commons/tests → cc_py_commons-0.5.1/cc_py_commons/sqs}/__init__.py
RENAMED
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/sqs/booking_assistant_flow_event.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/equipment_clas_schema.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/equipment_mapping_schema.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{cc_py_commons-0.4.9 → cc_py_commons-0.5.1}/cc_py_commons/transactions/transaction_schema.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|