Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def dist_init_distributor_dict():
distributor_dict.update(
{
'rs': {
'octopart_name': 'RS Components',
'module': 'rs', # The directory name containing this file.
'scrape': 'web', # Allowable values: 'web' or 'local'.
'label': 'RS Components', # Distributor label used in spreadsheet columns.
'order_cols': ['part_num', 'purch', 'refs'], # Sort-order for online orders.
'order_delimiter': ' ', # Delimiter for online orders.
# Formatting for distributor header in worksheet.
'wrk_hdr_format': {
'font_size': 14,
'font_color': 'white',
'bold': True,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#FF0000' # RS Components red.
def dist_init_distributor_dict():
distributor_dict.update(
{
'tme': {
'octopart_name': 'TME',
'module': 'tme', # The directory name containing this file.
'scrape': 'web', # Allowable values: 'web' or 'local'.
'label': 'TME', # Distributor label used in spreadsheet columns.
'order_cols': ['part_num', 'purch', 'refs'], # Sort-order for online orders.
'order_delimiter': ' ', # Delimiter for online orders.
# Formatting for distributor header in worksheet.
'wrk_hdr_format': {
'font_size': 14,
'font_color': 'white',
'bold': True,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#0C4DA1' # TME blue
def dist_init_distributor_dict():
distributor_dict.update(
{
'mouser': {
'module': 'mouser', # The directory name containing this file.
'scrape': 'web', # Allowable values: 'web' or 'local'.
'label': 'Mouser', # Distributor label used in spreadsheet columns.
'order_cols': ['part_num', 'purch', 'refs'], # Sort-order for online orders.
'order_delimiter': ' ', # Delimiter for online orders.
# Formatting for distributor header in worksheet.
'wrk_hdr_format': {
'font_size': 14,
'font_color': 'white',
'bold': True,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#004A85' # Mouser blue.
},
def dist_init_distributor_dict():
distributor_dict.update(
{
'digikey': {
'octopart_name': 'Digi-Key',
'module': 'digikey', # The directory name containing this file.
'scrape': 'web', # Allowable values: 'web' or 'local'.
'label': 'Digi-Key', # Distributor label used in spreadsheet columns.
'order_cols': ['purch', 'part_num', 'refs'], # Sort-order for online orders.
'order_delimiter': ',', # Delimiter for online orders.
# Formatting for distributor header in worksheet.
'wrk_hdr_format': {
'font_size': 14,
'font_color': 'white',
'bold': True,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#CC0000' # Digi-Key red.
def dist_init_distributor_dict():
distributor_dict.update({
'mouser': {
'octopart_name': 'Mouser',
'module': 'mouser', # The directory name containing this file.
'scrape': 'web', # Allowable values: 'web' or 'local'.
'label': 'Mouser', # Distributor label used in spreadsheet columns.
'order_cols': ['part_num', 'purch', 'refs'], # Sort-order for online orders.
'order_delimiter': ' ', # Delimiter for online orders.
# Formatting for distributor header in worksheet.
'wrk_hdr_format': {
'font_size': 14,
'font_color': 'white',
'bold': True,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#004A85' # Mouser blue.
},
def dist_init_distributor_dict():
distributor_dict.update({
'arrow': {
'octopart_name': 'Arrow Electronics, Inc.',
'module': 'arrow', # The directory name containing this file.
'scrape': 'web', # Allowable values: 'web' or 'local'.
'label': 'Arrow', # Distributor label used in spreadsheet columns.
'order_cols': ['part_num', 'purch', 'refs'], # Sort-order for online orders.
'order_delimiter': ',', # Delimiter for online orders.
# Formatting for distributor header in worksheet.
'wrk_hdr_format': {
'font_size': 14,
'font_color': 'white',
'bold': True,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#000000' # Arrow black.
},
def dist_init_distributor_dict():
distributor_dict.update({
'farnell': {
'octopart_name': 'Farnell',
'module': 'farnell', # The directory name containing this file.
'scrape': 'web', # Allowable values: 'web' or 'local'.
'label': 'Farnell', # Distributor label used in spreadsheet columns.
'order_cols': ['part_num', 'purch', 'refs'], # Sort-order for online orders.
'order_delimiter': ' ', # Delimiter for online orders.
# Formatting for distributor header in worksheet.
'wrk_hdr_format': {
'font_size': 14,
'font_color': 'white',
'bold': True,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#FF6600' # Farnell/E14 orange.
},
def dist_init_distributor_dict():
distributor_dict.update(
{
'digikey': {
'module': 'digikey', # The directory name containing this file.
'scrape': 'web', # Allowable values: 'web' or 'local'.
'label': 'Digi-Key', # Distributor label used in spreadsheet columns.
'order_cols': ['purch', 'part_num', 'refs'], # Sort-order for online orders.
'order_delimiter': ',', # Delimiter for online orders.
# Formatting for distributor header in worksheet.
'wrk_hdr_format': {
'font_size': 14,
'font_color': 'white',
'bold': True,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#CC0000' # Digi-Key red.
},