From cf1cce38222c0f3ccc16f4f2984a6425a77727ff Mon Sep 17 00:00:00 2001 From: neon Date: Mon, 9 Feb 2026 22:24:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=BD=D0=B5=D1=81=20=D0=B2=D1=81?= =?UTF-8?q?=D0=B5=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D0=B8=20=D0=B2=20=D0=BE?= =?UTF-8?q?=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=BA=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=20modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +++++ 1c-migration.py | 2 +- example_c1_cluster.py | 4 ++-- example_postgresql.py | 4 ++-- modules/__init__.py | 13 +++++++++++++ c1_cluster.py => modules/c1_cluster.py | 0 postgresql.py => modules/postgresql.py | 0 ssh.py => modules/ssh.py | 6 +++--- ssh_base.py => modules/ssh_base.py | 0 9 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 .gitignore create mode 100644 modules/__init__.py rename c1_cluster.py => modules/c1_cluster.py (100%) rename postgresql.py => modules/postgresql.py (100%) rename ssh.py => modules/ssh.py (94%) rename ssh_base.py => modules/ssh_base.py (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61e28ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bin/ +lib/ +lib64 +include/ +__pycache__/ diff --git a/1c-migration.py b/1c-migration.py index c976b7d..eb7215b 100755 --- a/1c-migration.py +++ b/1c-migration.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -import ssh as s +from modules import ssh as s import config # Загружаем конфигурацию diff --git a/example_c1_cluster.py b/example_c1_cluster.py index 86fdaaa..2561f0e 100755 --- a/example_c1_cluster.py +++ b/example_c1_cluster.py @@ -5,8 +5,8 @@ Демонстрирует прямое использование C1ClusterOperations без основного класса ssh """ import config -from ssh_base import SSHBase -from c1_cluster import C1ClusterOperations +from modules.ssh_base import SSHBase +from modules.c1_cluster import C1ClusterOperations def example_basic_usage(): diff --git a/example_postgresql.py b/example_postgresql.py index ef73459..54ca35b 100755 --- a/example_postgresql.py +++ b/example_postgresql.py @@ -5,8 +5,8 @@ Демонстрирует прямое использование PostgreSQLOperations без основного класса ssh """ import config -from ssh_base import SSHBase -from postgresql import PostgreSQLOperations +from modules.ssh_base import SSHBase +from modules.postgresql import PostgreSQLOperations def example_basic_usage(): diff --git a/modules/__init__.py b/modules/__init__.py new file mode 100644 index 0000000..f104011 --- /dev/null +++ b/modules/__init__.py @@ -0,0 +1,13 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +""" +Модули SSH клиента для миграции 1С +""" + +from .ssh_base import SSHBase +from .postgresql import PostgreSQLOperations +from .c1_cluster import C1ClusterOperations +from .ssh import ssh + +__all__ = ['SSHBase', 'PostgreSQLOperations', 'C1ClusterOperations', 'ssh'] + diff --git a/c1_cluster.py b/modules/c1_cluster.py similarity index 100% rename from c1_cluster.py rename to modules/c1_cluster.py diff --git a/postgresql.py b/modules/postgresql.py similarity index 100% rename from postgresql.py rename to modules/postgresql.py diff --git a/ssh.py b/modules/ssh.py similarity index 94% rename from ssh.py rename to modules/ssh.py index 8c13051..0d5b9e5 100755 --- a/ssh.py +++ b/modules/ssh.py @@ -4,9 +4,9 @@ Основной модуль SSH клиента для миграции 1С Объединяет базовые SSH операции, PostgreSQL и 1С кластер """ -from ssh_base import SSHBase -from postgresql import PostgreSQLOperations -from c1_cluster import C1ClusterOperations +from .ssh_base import SSHBase +from .postgresql import PostgreSQLOperations +from .c1_cluster import C1ClusterOperations class ssh(SSHBase, PostgreSQLOperations, C1ClusterOperations): diff --git a/ssh_base.py b/modules/ssh_base.py similarity index 100% rename from ssh_base.py rename to modules/ssh_base.py