Skip to content

Commit

Permalink
added parallel ability to connection, updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
marian-code committed Dec 22, 2020
1 parent 6ad4b39 commit 29c14dc
Show file tree
Hide file tree
Showing 13 changed files with 577 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
**/__pycache__/
**/.vscode/
**/.mypy_cache/
**/uml_images/**
build/
dist/
ssh_utilities.egg-info/
Expand Down
19 changes: 10 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ and command execution. The API vaguely follows python libraries: `builtins`_,


This is not intended to be a full fledged python ssh client. Instead it focuses
on smaller set of features which it trie to make as user-friendly as possible.
on smaller set of features which it tries to make as user-friendly and familiar
as possible.

This module should be ideally platform agnostic, but only connections from
Windows and Linux(Debian, Ubuntu) to Linux(Debian, Ubuntu) have been tested
so any other combinations are officially unsupported but should work.
so any other combinations are officially unsupported but should still work.

Design goals and features
-------------------------
Expand All @@ -86,12 +87,12 @@ List of inner classes and implemented methods
---------------------------------------------

ssh_utilities have three main connection classes:
- ``SSHConnection``
- ``LocalConnection``
- ``MultiConnection``
- ``SSHConnection``
- ``LocalConnection``
- ``MultiConnection``

Their inner classes with their methods are listed in the table below which
summarizes the API. based on table you can do for instance:
summarizes the API. Based on table you can do for instance:

.. code-block:: python
Expand Down Expand Up @@ -186,8 +187,7 @@ for more detailed usage examples please refer to
`documnetation <https://ssh-utilities.readthedocs.io/en/latest/>`_

``Connection`` factory supports dict-like indexing by values that are in
your **~/.ssh/config** file. It can be made thread safe by passing
``thread_safe=True`` argument to the constructor
your **~/.ssh/config** file.

.. code-block:: python
Expand All @@ -196,7 +196,8 @@ your **~/.ssh/config** file. It can be made thread safe by passing
>>> <ssh_utilities.ssh_utils.SSHConnection at 0x7efedff4fb38>
There is also a specific get method which is safer and with better typing
support than dict-like indexing
support than dict-like indexing. Connection can be made thread safe by passing
``thread_safe=True`` argument to the constructor

.. code-block:: python
Expand Down
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sphinx-rtd-theme>=0.5.0
sphinx-rtd-theme>=0.5.0
sphinx-pyreverse>=0.0.13
6 changes: 6 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"sphinx_rtd_theme",
'sphinx.ext.autodoc',
"sphinx.ext.napoleon",
'sphinx.ext.graphviz',
'sphinx.ext.inheritance_diagram',
'sphinx_pyreverse'
]

autodoc_default_options = {
Expand All @@ -54,6 +57,9 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# -- GraphViz configuration ----------------------------------
graphviz_output_format = 'png'

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
28 changes: 28 additions & 0 deletions docs/source/hierarchy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ssh-utilities class inheritance diagrams
========================================

``Connection`` factory

.. inheritance-diagram:: ssh_utilities.Connection
:parts: 1

``LocalConnection`` class

.. inheritance-diagram:: ssh_utilities.LocalConnection
:parts: 1

``SSHConnection`` class

.. inheritance-diagram:: ssh_utilities.SSHConnection
:parts: 1

``MultiConnection`` class

.. inheritance-diagram:: ssh_utilities.MultiConnection
:parts: 1

ssh-utilities UML classes graph
===============================

.. uml:: ssh_utilities
:classes:
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Projects home directory is on github:
usage_path
usage_multi
migration
hierarchy

Indices and tables
==================
Expand Down
12 changes: 12 additions & 0 deletions docs/source/usage_conn.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Connection usage
================

local connection module graph
-----------------------------

.. uml:: ssh_utilities.local
:classes:

remote connection module graph
------------------------------

.. uml:: ssh_utilities.remote
:classes:

Instantiating connection
------------------------

Expand Down
Loading

0 comments on commit 29c14dc

Please sign in to comment.