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
#!/usr/bin/env python3 | |
"""Fetch and print temporary session credentials with MFA | |
To use this tool first put the ARN of your MFA access token into a | |
file called .aws_token_id in your home directory and ensure that the | |
tool is on your path. Then execute the command: | |
eval `aws-session` | |
You will be promoted to enter your current MFA token value. After this |
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
# A Python (3) class for more compact path handling. | |
# | |
# If you find yourself calling os.path.join() with the same first parameter | |
# over and over again it can get rather tedious. Instead you can now go: | |
# | |
# path = PathPrefix("/some/path") | |
# file1 = path / "file1" | |
# sub_file = path / "subdir" / "file2" | |
class PathPrefix(str): |
NewerOlder