README.rst 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. ===============================
  2. Boto3 - The AWS SDK for Python
  3. ===============================
  4. |Version| |Python| |License|
  5. Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for
  6. Python, which allows Python developers to write software that makes use
  7. of services like Amazon S3 and Amazon EC2. You can find the latest, most
  8. up to date, documentation at our `doc site`_, including a list of
  9. services that are supported.
  10. Boto3 is maintained and published by `Amazon Web Services`_.
  11. Boto (pronounced boh-toh) was named after the fresh water dolphin native to the Amazon river. The name was chosen by the author of the original Boto library, Mitch Garnaat, as a reference to the company.
  12. Notices
  13. -------
  14. On 2023-12-13, support for Python 3.7 will end for Boto3. This follows the
  15. Python Software Foundation `end of support <https://peps.python.org/pep-0537/#lifespan>`__
  16. for the runtime which occurred on 2023-06-27.
  17. For more information, see this `blog post <https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/>`__.
  18. .. _boto: https://docs.pythonboto.org/
  19. .. _`doc site`: https://boto3.amazonaws.com/v1/documentation/api/latest/index.html
  20. .. _`Amazon Web Services`: https://aws.amazon.com/what-is-aws/
  21. .. |Python| image:: https://img.shields.io/pypi/pyversions/boto3.svg?style=flat
  22. :target: https://pypi.python.org/pypi/boto3/
  23. :alt: Python Versions
  24. .. |Version| image:: http://img.shields.io/pypi/v/boto3.svg?style=flat
  25. :target: https://pypi.python.org/pypi/boto3/
  26. :alt: Package Version
  27. .. |License| image:: http://img.shields.io/pypi/l/boto3.svg?style=flat
  28. :target: https://github.com/boto/boto3/blob/develop/LICENSE
  29. :alt: License
  30. Getting Started
  31. ---------------
  32. Assuming that you have a supported version of Python installed, you can first
  33. set up your environment with:
  34. .. code-block:: sh
  35. $ python -m venv .venv
  36. ...
  37. $ . .venv/bin/activate
  38. Then, you can install boto3 from PyPI with:
  39. .. code-block:: sh
  40. $ python -m pip install boto3
  41. or install from source with:
  42. .. code-block:: sh
  43. $ git clone https://github.com/boto/boto3.git
  44. $ cd boto3
  45. $ python -m pip install -r requirements.txt
  46. $ python -m pip install -e .
  47. Using Boto3
  48. ~~~~~~~~~~~~~~
  49. After installing boto3
  50. Next, set up credentials (in e.g. ``~/.aws/credentials``):
  51. .. code-block:: ini
  52. [default]
  53. aws_access_key_id = YOUR_KEY
  54. aws_secret_access_key = YOUR_SECRET
  55. Then, set up a default region (in e.g. ``~/.aws/config``):
  56. .. code-block:: ini
  57. [default]
  58. region=us-east-1
  59. Other credential configuration methods can be found `here <https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html>`__
  60. Then, from a Python interpreter:
  61. .. code-block:: python
  62. >>> import boto3
  63. >>> s3 = boto3.resource('s3')
  64. >>> for bucket in s3.buckets.all():
  65. print(bucket.name)
  66. Running Tests
  67. ~~~~~~~~~~~~~
  68. You can run tests in all supported Python versions using ``tox``. By default,
  69. it will run all of the unit and functional tests, but you can also specify your own
  70. ``pytest`` options. Note that this requires that you have all supported
  71. versions of Python installed, otherwise you must pass ``-e`` or run the
  72. ``pytest`` command directly:
  73. .. code-block:: sh
  74. $ tox
  75. $ tox -- unit/test_session.py
  76. $ tox -e py26,py33 -- integration/
  77. You can also run individual tests with your default Python version:
  78. .. code-block:: sh
  79. $ pytest tests/unit
  80. Getting Help
  81. ------------
  82. We use GitHub issues for tracking bugs and feature requests and have limited
  83. bandwidth to address them. Please use these community resources for getting
  84. help:
  85. * Ask a question on `Stack Overflow <https://stackoverflow.com/>`__ and tag it with `boto3 <https://stackoverflow.com/questions/tagged/boto3>`__
  86. * Open a support ticket with `AWS Support <https://console.aws.amazon.com/support/home#/>`__
  87. * If it turns out that you may have found a bug, please `open an issue <https://github.com/boto/boto3/issues/new>`__
  88. Contributing
  89. ------------
  90. We value feedback and contributions from our community. Whether it's a bug report, new feature, correction, or additional documentation, we welcome your issues and pull requests. Please read through this `CONTRIBUTING <https://github.com/boto/boto3/blob/develop/CONTRIBUTING.rst>`__ document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your contribution.
  91. Maintenance and Support for SDK Major Versions
  92. ----------------------------------------------
  93. Boto3 was made generally available on 06/22/2015 and is currently in the full support phase of the availability life cycle.
  94. For information about maintenance and support for SDK major versions and their underlying dependencies, see the following in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide:
  95. * `AWS SDKs and Tools Maintenance Policy <https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html>`__
  96. * `AWS SDKs and Tools Version Support Matrix <https://docs.aws.amazon.com/sdkref/latest/guide/version-support-matrix.html>`__
  97. More Resources
  98. --------------
  99. * `NOTICE <https://github.com/boto/boto3/blob/develop/NOTICE>`__
  100. * `Changelog <https://github.com/boto/boto3/blob/develop/CHANGELOG.rst>`__
  101. * `License <https://github.com/boto/boto3/blob/develop/LICENSE>`__