flexlate_dev.server package

Submodules

flexlate_dev.server.back_sync module

class flexlate_dev.server.back_sync.BackSyncServer(template_path, project_folder, sync_manager, auto_commit=True, check_interval_seconds=1)[source]

Bases: object

__init__(template_path, project_folder, sync_manager, auto_commit=True, check_interval_seconds=1)[source]
start()[source]
start_sync()[source]
stop()[source]
sync()[source]
flexlate_dev.server.back_sync.apply_diff_between_commits_to_separate_project(repo, sha1, sha2, project_path)[source]
Return type:

None

flexlate_dev.server.back_sync.apply_diff_to_project(project_path, diff)[source]
Return type:

None

flexlate_dev.server.back_sync.apply_file_diff_to_project(project_path, diff)[source]
Return type:

None

flexlate_dev.server.back_sync.commit_in_one_repo_with_another_repo_commit_message(repo, other_repo, commit_sha)[source]
Return type:

None

flexlate_dev.server.back_sync.get_diff_between_commits(repo, sha1, sha2)[source]
Return type:

PatchSet

flexlate_dev.server.back_sync.get_last_commit_sha(repo)[source]
Return type:

str

flexlate_dev.server.back_sync.is_pure_rename(diff)[source]
Return type:

bool

flexlate_dev.server.main module

class flexlate_dev.server.main.ServerContext(sync_manager, back_sync_manager=None)[source]

Bases: object

__init__(sync_manager, back_sync_manager=None)[source]
property back_sync_is_sleeping: bool
Return type:

bool

property is_back_syncing: bool
Return type:

bool

flexlate_dev.server.main.run_server(config, run_config_name=None, template_path=PosixPath('.'), out_path=None, back_sync=False, no_input=False, auto_commit=True, back_sync_auto_commit=True, back_sync_check_interval_seconds=1, save=False, data=None, folder_name=None)[source]
Return type:

Iterator[ServerContext]

flexlate_dev.server.main.serve_template(run_config_name=None, template_path=PosixPath('.'), out_path=None, back_sync=False, no_input=False, auto_commit=True, config_path=None, save=False, data=None, folder_name=None)[source]

flexlate_dev.server.sync module

class flexlate_dev.server.sync.ServerEventHandler(config, template_path, out_root, run_config_name=None, no_input=False, auto_commit=True, save=False, data=None, folder_name=None)[source]

Bases: FileSystemEventHandler

__init__(config, template_path, out_root, run_config_name=None, no_input=False, auto_commit=True, save=False, data=None, folder_name=None)[source]
property data: Dict[str, Any]
Return type:

Dict[str, Any]

on_modified(event)[source]

Called when a file or directory is modified.

Parameters:

event (DirModifiedEvent or FileModifiedEvent) – Event representing file/directory modification.

property out_path: Path
Return type:

Path

sync_output()[source]
class flexlate_dev.server.sync.SyncServerManager(handler)[source]

Bases: object

__init__(handler)[source]
initial_start()[source]
start()[source]
stop()[source]
flexlate_dev.server.sync.create_sync_server(config, template_path, out_root, run_config_name=None, no_input=False, auto_commit=True, save=False, data=None, folder_name=None)[source]
Return type:

Iterator[SyncServerManager]

flexlate_dev.server.sync.pause_sync(manager)[source]