forked from containers/podman-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sphinx configured to process docstrings
* Sphinx configured to create html documentation from docstrings on API. Low level and deprecated classes not included in index. * Downgraded urllib3 in setup.cfg * Updated some docstrings after seeing the results from Sphinx Signed-off-by: Jhon Honce <[email protected]>
- Loading branch information
Showing
13 changed files
with
195 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>About PodmanPy</title> | ||
</head> | ||
<body> | ||
About PodmanPy | ||
</body> | ||
</html> |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{%- if show_headings %} | ||
{{- basename | replace("podman.", "") | e | heading }} | ||
|
||
{% endif -%} | ||
.. automodule:: {{ qualname }} | ||
{%- for option in automodule_options %} | ||
:{{ option }}: | ||
{%- endfor %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{%- macro automodule(modname, options) -%} | ||
.. automodule:: {{ modname }} | ||
{%- for option in options %} | ||
:{{ option }}: | ||
{%- endfor %} | ||
{%- endmacro %} | ||
|
||
{%- macro toctree(docnames) -%} | ||
.. toctree:: | ||
:maxdepth: {{ maxdepth }} | ||
{% for docname in docnames %} | ||
{{ docname }} | ||
{%- endfor %} | ||
{%- endmacro %} | ||
|
||
{%- if is_namespace %} | ||
{{- [pkgname, "namespace"] | join(" ") | e | heading }} | ||
{% else %} | ||
{{- [pkgname, "package"] | join(" ") | e | heading }} | ||
{% endif %} | ||
|
||
{%- if modulefirst and not is_namespace %} | ||
{{ automodule(pkgname, automodule_options) }} | ||
{% endif %} | ||
|
||
{%- if subpackages %} | ||
Subpackages | ||
----------- | ||
|
||
{{ toctree(subpackages) }} | ||
{% endif %} | ||
|
||
{%- if submodules %} | ||
Submodules | ||
---------- | ||
{% if separatemodules %} | ||
{{ toctree(submodules) }} | ||
{% else %} | ||
{%- for submodule in submodules %} | ||
{% if show_headings %} | ||
{{- [submodule, "module"] | join(" ") | e | heading(2) }} | ||
{% endif %} | ||
{{ automodule(submodule, automodule_options) }} | ||
{% endfor %} | ||
{%- endif %} | ||
{%- endif %} | ||
|
||
{%- if not modulefirst and not is_namespace %} | ||
Module contents | ||
--------------- | ||
|
||
{{ automodule(pkgname, automodule_options) }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{ header | heading }} | ||
|
||
.. toctree:: | ||
:maxdepth: {{ maxdepth }} | ||
{% for docname in docnames %} | ||
{{ docname }} | ||
{%- endfor %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,70 @@ | ||
PodmanPy: Python scripting for Podman services | ||
============================================== | ||
.. image:: https://img.shields.io/pypi/l/podman-py.svg | ||
:target: https://pypi.org/project/podman-py/ | ||
|
||
.. image:: https://github.com/containers/podman/blob/master/logo/podman-logo.png?raw=true | ||
.. image:: https://img.shields.io/pypi/wheel/podman-py.svg | ||
:target: https://pypi.org/project/podman-py/ | ||
|
||
What is PodmanPy? | ||
==================================== | ||
.. image:: https://img.shields.io/pypi/pyversions/podman-py.svg | ||
:target: https://pypi.org/project/podman-py/ | ||
|
||
PodmanPy is a Python3 module that allows you to write Python scripts that access resources | ||
maintained by a Podman service. | ||
maintained by a Podman service. It leverages the Podman service RESTful API. | ||
|
||
PodmanPy leverages the Podman service RESTful API. Connections via http+ssh://, http+unix:// or | ||
tcp:// are supported. | ||
Podman services are addressed using a URL where the scheme signals to the client how to connect to | ||
service. Supported schemes are: ``http+ssh``, ``http+unix`` or ``tcp``. Formats are the following styles: | ||
|
||
.. automodule:: podman | ||
:members: | ||
:inherited-members: | ||
- ``http+ssh://[<login>@]<hostname>[:<port>]/<full filesystem path>`` | ||
|
||
- ``http+ssh://[email protected]:22/run/user/1000/podman/podman.sock`` | ||
- The scheme ``ssh`` is excepted as an alias | ||
|
||
- ``http+unix://<full filesystem path>`` | ||
|
||
- ``http+unix:///run/podman/podman.sock`` | ||
- The scheme ``unix`` is excepted as an alias | ||
|
||
- ``tcp://<hostname>:<port>`` | ||
|
||
- ``tcp://api.example:8888`` | ||
|
||
Example | ||
------- | ||
.. code-block:: python | ||
:linenos: | ||
import podman | ||
with podman.Client() as client: | ||
if client.ping(): | ||
images = client.images.list() | ||
for image in images: | ||
print(image.id) | ||
.. toctree:: | ||
:caption: Podman Client | ||
:maxdepth: 2 | ||
|
||
podman.client | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
:caption: Podman Entities | ||
:glob: | ||
:hidden: | ||
|
||
modules | ||
podman.domain.containers | ||
podman.domain.containers_manager | ||
podman.domain.images | ||
podman.domain.images_manager | ||
podman.domain.events* | ||
podman.domain.manifests* | ||
podman.domain.networks* | ||
podman.domain.pods* | ||
podman.domain.secrets* | ||
podman.domain.system* | ||
podman.domain.volume* | ||
podman.errors.exceptions | ||
|
||
Indices and tables | ||
================== | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
-r requirements.txt | ||
black | ||
coverage | ||
fixtures~=3.0.0 | ||
|