awscli-mate


Nameawscli-mate JSON
Version 1.1.3 PyPI version JSON
download
home_pagehttps://github.com/MacHu-GWU/awscli_mate-project
SummaryAWS CLI improvement.
upload_time2024-12-02 07:01:02
maintainerSanhe Hu
docs_urlNone
authorSanhe Hu
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            
.. .. image:: https://readthedocs.org/projects/awscli_mate/badge/?version=latest
    :target: https://awscli_mate.readthedocs.io/index.html
    :alt: Documentation Status

.. image:: https://github.com/MacHu-GWU/awscli_mate-project/workflows/CI/badge.svg
    :target: https://github.com/MacHu-GWU/awscli_mate-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/MacHu-GWU/awscli_mate-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/awscli_mate-project

.. image:: https://img.shields.io/pypi/v/awscli_mate.svg
    :target: https://pypi.python.org/pypi/awscli_mate

.. image:: https://img.shields.io/pypi/l/awscli_mate.svg
    :target: https://pypi.python.org/pypi/awscli_mate

.. image:: https://img.shields.io/pypi/pyversions/awscli_mate.svg
    :target: https://pypi.python.org/pypi/awscli_mate

.. image:: https://img.shields.io/badge/Release_History!--None.svg?style=social
    :target: https://github.com/MacHu-GWU/awscli_mate-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
    :target: https://github.com/MacHu-GWU/awscli_mate-project

------


.. .. image:: https://img.shields.io/badge/Link-Document-blue.svg
    :target: https://awscli_mate.readthedocs.io/index.html

.. .. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://awscli_mate.readthedocs.io/py-modindex.html

.. .. image:: https://img.shields.io/badge/Link-Source_Code-blue.svg
    :target: https://awscli_mate.readthedocs.io/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/awscli_mate-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/awscli_mate-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/awscli_mate-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/awscli_mate#files


Welcome to ``awscli_mate`` Documentation
==============================================================================
``awscli_mate`` improves the original AWS CLI.

Make sure you have done::

    pip install awscli_mate
    pip install boto3
    pip install fire


Set AWS Profile as Default
------------------------------------------------------------------------------
It is very common that you wants to set a profile as the default when using a tools that doesn't support explicit ``--profile ...`` argument. ``awscli_mate`` provides a command to do this for you. It will update your ``.aws/config`` and ``.aws/credentials`` file and set the ``default`` profile to the one you specified.

Example:

.. code-block:: python

    awscli_mate set_profile_as_default --profile=your_profile


One Click MFA auth
------------------------------------------------------------------------------
Based on this `AWS re:Post How do I use an MFA token to authenticate access to my AWS resources through the AWS CLI? <https://repost.aws/knowledge-center/authenticate-mfa-cli>`_, you have to run ``aws sts get-session-token ...`` command to get some token, and manually copy and paste them to either environment variable or ``.aws/credentials`` file. This is a bit tedious. ``awscli_mate`` provides a one-click command to do this for you. Basically, it will use a base profile to get the token, let's say it is ``your_profile``, and automatically create / update a new profile called ``your_profile_mfa`` in your ``.aws/config`` and ``.aws/credentials`` file. So you can keep using the ``your_profile_mfa`` in your application.

Example:

.. code-block:: python

    awscli_mate mfa_auth --profile=your_profile --mfa_code=123456 --hours=12 --overwrite_default=True

Note that this command also automatically set the MFA profile as default profile. If you don't want to set the ``your_profile_mfa`` as default profile automatically, you can just remove the ``--overwrite_default`` part.


Use ``awscli_mate`` as a Python Library
------------------------------------------------------------------------------
See `example <https://github.com/MacHu-GWU/awscli_mate-project/blob/main/example.ipynb>`_.


Use ``awscli_mate`` as a Interactive CLI
------------------------------------------------------------------------------
**Set named AWS Profile as default**

.. image:: https://github.com/MacHu-GWU/awscli_mate-project/assets/6800411/c031a52a-2b4e-4dde-85f1-ab558aa1644f

**Do MFA Authentication**

.. image:: https://github.com/MacHu-GWU/awscli_mate-project/assets/6800411/5cc9ddef-18a5-4d76-942f-4be1e97601aa

**Keyboard shortcuts**:

- hit Ctrl + E or UP to move item selection up.
- hit Ctrl + R to scroll item selection up.
- hit Ctrl + D or DOWN to move item selection up.
- hit Ctrl + F to scroll item selection up.
- hit Ctrl + H or LEFT to move query input cursor to the left (this won't work on Windows).
- hit Ctrl + L or RIGHT to move query input cursor to the right.
- hit Ctrl + G to move query input cursor to the previous word.
- hit Ctrl + K to move query input cursor to the next word.
- hit Ctrl + X to clear the query input.
- hit Tab to auto-complete.
- hit BACKSPACE to delete query input backward.
- hit DELETE to delete query input forward.
- hit Enter to run it.


.. _install:

Install
------------------------------------------------------------------------------

``awscli_mate`` is released on PyPI, so all you need is:

.. code-block:: console

    $ pip install awscli_mate

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade awscli_mate

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MacHu-GWU/awscli_mate-project",
    "name": "awscli-mate",
    "maintainer": "Sanhe Hu",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "husanhe@gmail.com",
    "keywords": null,
    "author": "Sanhe Hu",
    "author_email": "husanhe@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7b/43/dc73ed11bf7eaa67313020b0fb42489728d192e47e785acc753fc0048f97/awscli_mate-1.1.3.tar.gz",
    "platform": "Windows",
    "description": "\n.. .. image:: https://readthedocs.org/projects/awscli_mate/badge/?version=latest\n    :target: https://awscli_mate.readthedocs.io/index.html\n    :alt: Documentation Status\n\n.. image:: https://github.com/MacHu-GWU/awscli_mate-project/workflows/CI/badge.svg\n    :target: https://github.com/MacHu-GWU/awscli_mate-project/actions?query=workflow:CI\n\n.. image:: https://codecov.io/gh/MacHu-GWU/awscli_mate-project/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/MacHu-GWU/awscli_mate-project\n\n.. image:: https://img.shields.io/pypi/v/awscli_mate.svg\n    :target: https://pypi.python.org/pypi/awscli_mate\n\n.. image:: https://img.shields.io/pypi/l/awscli_mate.svg\n    :target: https://pypi.python.org/pypi/awscli_mate\n\n.. image:: https://img.shields.io/pypi/pyversions/awscli_mate.svg\n    :target: https://pypi.python.org/pypi/awscli_mate\n\n.. image:: https://img.shields.io/badge/Release_History!--None.svg?style=social\n    :target: https://github.com/MacHu-GWU/awscli_mate-project/blob/main/release-history.rst\n\n.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social\n    :target: https://github.com/MacHu-GWU/awscli_mate-project\n\n------\n\n\n.. .. image:: https://img.shields.io/badge/Link-Document-blue.svg\n    :target: https://awscli_mate.readthedocs.io/index.html\n\n.. .. image:: https://img.shields.io/badge/Link-API-blue.svg\n    :target: https://awscli_mate.readthedocs.io/py-modindex.html\n\n.. .. image:: https://img.shields.io/badge/Link-Source_Code-blue.svg\n    :target: https://awscli_mate.readthedocs.io/py-modindex.html\n\n.. image:: https://img.shields.io/badge/Link-Install-blue.svg\n    :target: `install`_\n\n.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg\n    :target: https://github.com/MacHu-GWU/awscli_mate-project\n\n.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg\n    :target: https://github.com/MacHu-GWU/awscli_mate-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg\n    :target: https://github.com/MacHu-GWU/awscli_mate-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Download-blue.svg\n    :target: https://pypi.org/pypi/awscli_mate#files\n\n\nWelcome to ``awscli_mate`` Documentation\n==============================================================================\n``awscli_mate`` improves the original AWS CLI.\n\nMake sure you have done::\n\n    pip install awscli_mate\n    pip install boto3\n    pip install fire\n\n\nSet AWS Profile as Default\n------------------------------------------------------------------------------\nIt is very common that you wants to set a profile as the default when using a tools that doesn't support explicit ``--profile ...`` argument. ``awscli_mate`` provides a command to do this for you. It will update your ``.aws/config`` and ``.aws/credentials`` file and set the ``default`` profile to the one you specified.\n\nExample:\n\n.. code-block:: python\n\n    awscli_mate set_profile_as_default --profile=your_profile\n\n\nOne Click MFA auth\n------------------------------------------------------------------------------\nBased on this `AWS re:Post How do I use an MFA token to authenticate access to my AWS resources through the AWS CLI? <https://repost.aws/knowledge-center/authenticate-mfa-cli>`_, you have to run ``aws sts get-session-token ...`` command to get some token, and manually copy and paste them to either environment variable or ``.aws/credentials`` file. This is a bit tedious. ``awscli_mate`` provides a one-click command to do this for you. Basically, it will use a base profile to get the token, let's say it is ``your_profile``, and automatically create / update a new profile called ``your_profile_mfa`` in your ``.aws/config`` and ``.aws/credentials`` file. So you can keep using the ``your_profile_mfa`` in your application.\n\nExample:\n\n.. code-block:: python\n\n    awscli_mate mfa_auth --profile=your_profile --mfa_code=123456 --hours=12 --overwrite_default=True\n\nNote that this command also automatically set the MFA profile as default profile. If you don't want to set the ``your_profile_mfa`` as default profile automatically, you can just remove the ``--overwrite_default`` part.\n\n\nUse ``awscli_mate`` as a Python Library\n------------------------------------------------------------------------------\nSee `example <https://github.com/MacHu-GWU/awscli_mate-project/blob/main/example.ipynb>`_.\n\n\nUse ``awscli_mate`` as a Interactive CLI\n------------------------------------------------------------------------------\n**Set named AWS Profile as default**\n\n.. image:: https://github.com/MacHu-GWU/awscli_mate-project/assets/6800411/c031a52a-2b4e-4dde-85f1-ab558aa1644f\n\n**Do MFA Authentication**\n\n.. image:: https://github.com/MacHu-GWU/awscli_mate-project/assets/6800411/5cc9ddef-18a5-4d76-942f-4be1e97601aa\n\n**Keyboard shortcuts**:\n\n- hit Ctrl + E or UP to move item selection up.\n- hit Ctrl + R to scroll item selection up.\n- hit Ctrl + D or DOWN to move item selection up.\n- hit Ctrl + F to scroll item selection up.\n- hit Ctrl + H or LEFT to move query input cursor to the left (this won't work on Windows).\n- hit Ctrl + L or RIGHT to move query input cursor to the right.\n- hit Ctrl + G to move query input cursor to the previous word.\n- hit Ctrl + K to move query input cursor to the next word.\n- hit Ctrl + X to clear the query input.\n- hit Tab to auto-complete.\n- hit BACKSPACE to delete query input backward.\n- hit DELETE to delete query input forward.\n- hit Enter to run it.\n\n\n.. _install:\n\nInstall\n------------------------------------------------------------------------------\n\n``awscli_mate`` is released on PyPI, so all you need is:\n\n.. code-block:: console\n\n    $ pip install awscli_mate\n\nTo upgrade to latest version:\n\n.. code-block:: console\n\n    $ pip install --upgrade awscli_mate\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AWS CLI improvement.",
    "version": "1.1.3",
    "project_urls": {
        "Download": "https://pypi.python.org/pypi/awscli_mate/1.1.3#downloads",
        "Homepage": "https://github.com/MacHu-GWU/awscli_mate-project"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4056a1f18be88961bb09e52dd410d46c647e2344e54a8a2b121c62589ca7c267",
                "md5": "633ed959515c0357f91ccdebd5af9cd0",
                "sha256": "41e33216cea637d0efe244ca69a8bae411760ad5dce8182312e004a9bee2065d"
            },
            "downloads": -1,
            "filename": "awscli_mate-1.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "633ed959515c0357f91ccdebd5af9cd0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 18341,
            "upload_time": "2024-12-02T07:00:58",
            "upload_time_iso_8601": "2024-12-02T07:00:58.574815Z",
            "url": "https://files.pythonhosted.org/packages/40/56/a1f18be88961bb09e52dd410d46c647e2344e54a8a2b121c62589ca7c267/awscli_mate-1.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b43dc73ed11bf7eaa67313020b0fb42489728d192e47e785acc753fc0048f97",
                "md5": "ba6873ee3f6341f1ffd2dc6375194ce4",
                "sha256": "3c487399304d335bbff9b63268b105ea9caba88862baf8eb7b6c432abf911edb"
            },
            "downloads": -1,
            "filename": "awscli_mate-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ba6873ee3f6341f1ffd2dc6375194ce4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 21057,
            "upload_time": "2024-12-02T07:01:02",
            "upload_time_iso_8601": "2024-12-02T07:01:02.314550Z",
            "url": "https://files.pythonhosted.org/packages/7b/43/dc73ed11bf7eaa67313020b0fb42489728d192e47e785acc753fc0048f97/awscli_mate-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-02 07:01:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MacHu-GWU",
    "github_project": "awscli_mate-project",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "awscli-mate"
}
        
Elapsed time: 1.80553s