mdbq 3.3.9__tar.gz → 3.3.10__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.
Files changed (43) hide show
  1. {mdbq-3.3.9 → mdbq-3.3.10}/PKG-INFO +1 -1
  2. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/config/products.py +12 -13
  3. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/mysql/mysql.py +2 -2
  4. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq.egg-info/PKG-INFO +1 -1
  5. {mdbq-3.3.9 → mdbq-3.3.10}/setup.py +1 -1
  6. {mdbq-3.3.9 → mdbq-3.3.10}/README.txt +0 -0
  7. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/__init__.py +0 -0
  8. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/__version__.py +0 -0
  9. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/aggregation/__init__.py +0 -0
  10. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/aggregation/aggregation.py +0 -0
  11. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/aggregation/optimize_data.py +0 -0
  12. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/aggregation/query_data.py +0 -0
  13. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/bdup/__init__.py +0 -0
  14. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/bdup/bdup.py +0 -0
  15. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/config/__init__.py +0 -0
  16. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/config/myconfig.py +0 -0
  17. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/config/set_support.py +0 -0
  18. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/dataframe/__init__.py +0 -0
  19. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/dataframe/converter.py +0 -0
  20. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/log/__init__.py +0 -0
  21. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/log/mylogger.py +0 -0
  22. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/mongo/__init__.py +0 -0
  23. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/mongo/mongo.py +0 -0
  24. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/mysql/__init__.py +0 -0
  25. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/mysql/recheck_mysql.py +0 -0
  26. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/mysql/s_query.py +0 -0
  27. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/mysql/year_month_day.py +0 -0
  28. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/other/__init__.py +0 -0
  29. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/other/download_sku_picture.py +0 -0
  30. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/other/porxy.py +0 -0
  31. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/other/pov_city.py +0 -0
  32. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/other/sku_picture.py +0 -0
  33. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/other/ua_sj.py +0 -0
  34. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/pbix/__init__.py +0 -0
  35. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/pbix/pbix_refresh.py +0 -0
  36. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/pbix/refresh_all.py +0 -0
  37. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/pbix/refresh_all_old.py +0 -0
  38. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/spider/__init__.py +0 -0
  39. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq/spider/aikucun.py +0 -0
  40. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq.egg-info/SOURCES.txt +0 -0
  41. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq.egg-info/dependency_links.txt +0 -0
  42. {mdbq-3.3.9 → mdbq-3.3.10}/mdbq.egg-info/top_level.txt +0 -0
  43. {mdbq-3.3.9 → mdbq-3.3.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mdbq
3
- Version: 3.3.9
3
+ Version: 3.3.10
4
4
  Home-page: https://pypi.org/project/mdbq
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -134,19 +134,18 @@ class Products:
134
134
  host=host,
135
135
  port=port,
136
136
  )
137
- for dict_data in df.to_dict(orient='records'):
138
- m_engine.dict_to_mysql(
139
- db_name='属性设置3',
140
- table_name='货品年份基准',
141
- dict_data=dict_data,
142
- # icm_update=['日期', '店铺名称', '宝贝id'], # 唯一组合键
143
- unique_main_key=['商品id'],
144
- set_typ={
145
- '商品id': 'bigint',
146
- '平台': 'varchar(100)',
147
- '上市年份': 'varchar(100)',
148
- },
149
- )
137
+ m_engine.insert_many_dict(
138
+ db_name='属性设置3',
139
+ table_name='货品年份基准',
140
+ dict_data_list=df.to_dict(orient='records'),
141
+ # icm_update=['日期', '店铺名称', '宝贝id'], # 唯一组合键
142
+ unique_main_key=['商品id'],
143
+ set_typ={
144
+ '商品id': 'bigint',
145
+ '平台': 'varchar(100)',
146
+ '上市年份': 'varchar(100)',
147
+ },
148
+ )
150
149
 
151
150
  def market_date(self, product_id: int):
152
151
  try:
@@ -477,6 +477,7 @@ class MysqlUpload:
477
477
  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
478
478
  # 处理插入的数据
479
479
  for dict_data in dict_data_list:
480
+ # print(dict_data)
480
481
  dtypes, dict_data = self.cover_dict_dtypes(dict_data=dict_data) # {'店铺名称': 'varchar(100)',...}
481
482
  if icm_update:
482
483
  """ 使用增量更新: 需确保 icm_update['主键'] 传进来的列组合是数据表中唯一,值不会发生变化且不会重复,否则可能产生覆盖 """
@@ -535,8 +536,7 @@ class MysqlUpload:
535
536
  sql = f"INSERT INTO `{table_name}` ({cols}) VALUES ({values});"
536
537
  cursor.execute(sql)
537
538
  connection.commit() # 提交数据库
538
- connection.close()
539
- return
539
+ continue
540
540
 
541
541
  # 构建 keys
542
542
  keys_data = ', '.join([f'`{str(item)}`' for item in dict_data.keys()])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mdbq
3
- Version: 3.3.9
3
+ Version: 3.3.10
4
4
  Home-page: https://pypi.org/project/mdbq
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -3,7 +3,7 @@
3
3
  from setuptools import setup, find_packages
4
4
 
5
5
  setup(name='mdbq',
6
- version='3.3.9',
6
+ version='3.3.10',
7
7
  author='xigua, ',
8
8
  author_email="2587125111@qq.com",
9
9
  url='https://pypi.org/project/mdbq',
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
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