Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

METADATA 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. Metadata-Version: 2.1
  2. Name: docker
  3. Version: 6.1.3
  4. Summary: A Python library for the Docker Engine API.
  5. Home-page: https://github.com/docker/docker-py
  6. Maintainer: Ulysses Souza
  7. Maintainer-email: ulysses.souza@docker.com
  8. License: Apache License 2.0
  9. Project-URL: Documentation, https://docker-py.readthedocs.io
  10. Project-URL: Changelog, https://docker-py.readthedocs.io/en/stable/change-log.html
  11. Project-URL: Source, https://github.com/docker/docker-py
  12. Project-URL: Tracker, https://github.com/docker/docker-py/issues
  13. Classifier: Development Status :: 5 - Production/Stable
  14. Classifier: Environment :: Other Environment
  15. Classifier: Intended Audience :: Developers
  16. Classifier: Operating System :: OS Independent
  17. Classifier: Programming Language :: Python
  18. Classifier: Programming Language :: Python :: 3
  19. Classifier: Programming Language :: Python :: 3.7
  20. Classifier: Programming Language :: Python :: 3.8
  21. Classifier: Programming Language :: Python :: 3.9
  22. Classifier: Programming Language :: Python :: 3.10
  23. Classifier: Programming Language :: Python :: 3.11
  24. Classifier: Topic :: Software Development
  25. Classifier: Topic :: Utilities
  26. Classifier: License :: OSI Approved :: Apache Software License
  27. Requires-Python: >=3.7
  28. Description-Content-Type: text/markdown
  29. License-File: LICENSE
  30. Requires-Dist: packaging (>=14.0)
  31. Requires-Dist: requests (>=2.26.0)
  32. Requires-Dist: urllib3 (>=1.26.0)
  33. Requires-Dist: websocket-client (>=0.32.0)
  34. Requires-Dist: pywin32 (>=304) ; sys_platform == "win32"
  35. Provides-Extra: ssh
  36. Requires-Dist: paramiko (>=2.4.3) ; extra == 'ssh'
  37. Provides-Extra: tls
  38. # Docker SDK for Python
  39. [![Build Status](https://github.com/docker/docker-py/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/docker/docker-py/actions/workflows/ci.yml/)
  40. A Python library for the Docker Engine API. It lets you do anything the `docker` command does, but from within Python apps – run containers, manage containers, manage Swarms, etc.
  41. ## Installation
  42. The latest stable version [is available on PyPI](https://pypi.python.org/pypi/docker/). Either add `docker` to your `requirements.txt` file or install with pip:
  43. pip install docker
  44. > Older versions (< 6.0) required installing `docker[tls]` for SSL/TLS support.
  45. > This is no longer necessary and is a no-op, but is supported for backwards compatibility.
  46. ## Usage
  47. Connect to Docker using the default socket or the configuration in your environment:
  48. ```python
  49. import docker
  50. client = docker.from_env()
  51. ```
  52. You can run containers:
  53. ```python
  54. >>> client.containers.run("ubuntu:latest", "echo hello world")
  55. 'hello world\n'
  56. ```
  57. You can run containers in the background:
  58. ```python
  59. >>> client.containers.run("bfirsh/reticulate-splines", detach=True)
  60. <Container '45e6d2de7c54'>
  61. ```
  62. You can manage containers:
  63. ```python
  64. >>> client.containers.list()
  65. [<Container '45e6d2de7c54'>, <Container 'db18e4f20eaa'>, ...]
  66. >>> container = client.containers.get('45e6d2de7c54')
  67. >>> container.attrs['Config']['Image']
  68. "bfirsh/reticulate-splines"
  69. >>> container.logs()
  70. "Reticulating spline 1...\n"
  71. >>> container.stop()
  72. ```
  73. You can stream logs:
  74. ```python
  75. >>> for line in container.logs(stream=True):
  76. ... print(line.strip())
  77. Reticulating spline 2...
  78. Reticulating spline 3...
  79. ...
  80. ```
  81. You can manage images:
  82. ```python
  83. >>> client.images.pull('nginx')
  84. <Image 'nginx'>
  85. >>> client.images.list()
  86. [<Image 'ubuntu'>, <Image 'nginx'>, ...]
  87. ```
  88. [Read the full documentation](https://docker-py.readthedocs.io) to see everything you can do.