linkarchivetools 0.1.17__tar.gz → 0.1.18__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 (18) hide show
  1. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/PKG-INFO +4 -3
  2. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/utils/reflected.py +41 -0
  3. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/pyproject.toml +2 -2
  4. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/LICENSE +0 -0
  5. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/README.md +0 -0
  6. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/LICENSE +0 -0
  7. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/README.md +0 -0
  8. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/__init__.py +0 -0
  9. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/backup.py +0 -0
  10. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/db2feeds.py +0 -0
  11. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/db2json.py +0 -0
  12. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/dbanalyzer.py +0 -0
  13. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/dbfilter.py +0 -0
  14. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/dbmerge.py +0 -0
  15. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/json2db.py +0 -0
  16. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/tableconfig.py +0 -0
  17. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/utils/alchemysearch.py +0 -0
  18. {linkarchivetools-0.1.17 → linkarchivetools-0.1.18}/linkarchivetools/utils/omnisearch.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: linkarchivetools
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: Link Archive Tools
5
5
  License: GPL3
6
6
  Author: Iwan Grozny
@@ -11,12 +11,13 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
14
15
  Requires-Dist: psycopg2-binary
15
16
  Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
16
17
  Requires-Dist: requests (>=2.32.5,<3.0.0)
17
18
  Requires-Dist: sqlalchemy
18
19
  Requires-Dist: sympy (>=1.13.2,<2.0.0)
19
- Requires-Dist: webtoolkit (>=0.0.191,<0.0.192)
20
+ Requires-Dist: webtoolkit (>=0.0.194,<0.0.195)
20
21
  Description-Content-Type: text/markdown
21
22
 
22
23
  # Link Database Tools
@@ -478,6 +478,19 @@ class ReflectedSourceTable(ReflectedGenericTable):
478
478
  return self.connection.execute(stmt).scalar()
479
479
 
480
480
 
481
+ class ReflectedSourceOperationalData(ReflectedGenericTable):
482
+ def get_table_name(self):
483
+ return "sourceoperationaldata"
484
+
485
+ def get_for_source(self, source_id):
486
+ destination_table = self.get_table()
487
+
488
+ stmt = select(destination_table).where(destination_table.c.source_obj_id == source_id)
489
+
490
+ result = self.connection.execute(stmt)
491
+ return result.first()
492
+
493
+
481
494
  class ReflectedSocialData(ReflectedGenericTable):
482
495
  def get_table_name(self):
483
496
  return "socialdata"
@@ -504,6 +517,34 @@ class ReflectedEntryRules(ReflectedGenericTable):
504
517
  return "entryrules"
505
518
 
506
519
 
520
+ class ReflectedConfigurationEntry(ReflectedGenericTable):
521
+ def get_table_name(self):
522
+ return "configurationentry"
523
+
524
+ def get(self):
525
+ first_item = self.get_first()
526
+ if first_item:
527
+ return first_item
528
+
529
+ self.add_configuration()
530
+
531
+ first_item = self.get_first()
532
+ if first_item:
533
+ return first_item
534
+
535
+ def get_first(self):
536
+ destination_table = self.get_table()
537
+
538
+ stmt = select(destination_table)
539
+
540
+ result = self.connection.execute(stmt)
541
+ return result.first()
542
+
543
+ def add_configuration(self):
544
+ json_data = {}
545
+ self.insert_json_data(json_data)
546
+
547
+
507
548
  class EntryCopier(object):
508
549
  def __init__(self, src_engine, src_connection, dst_engine, dst_connection):
509
550
  self.src_engine = src_engine
@@ -3,7 +3,7 @@
3
3
 
4
4
  [tool.poetry]
5
5
  name = "linkarchivetools"
6
- version = "0.1.17"
6
+ version = "0.1.18"
7
7
  description = "Link Archive Tools"
8
8
  authors = ["Iwan Grozny <renegat@renegat0x0.ddns.net>"]
9
9
  license = "GPL3"
@@ -13,7 +13,7 @@ readme = "README.md"
13
13
  python = "^3.10"
14
14
  python-dateutil = "^2.8.2"
15
15
  sqlalchemy="*"
16
- webtoolkit="^0.0.191"
16
+ webtoolkit="^0.0.194"
17
17
  sympy="^1.13.2"
18
18
  psycopg2-binary="*"
19
19