Unofficial implementation of 2fas for Python (as a CLI tool)
Project description
2fas Python
2fas-python is an unofficial implementation of 2FAS - the Internet’s favorite open-source two-factor authenticator. It consists of a core library in Python and a CLI tool.
Installation
To install this project, use pip or pipx:
pip install 2fas
# or:
pipx install 2fas
Usage
To see all available options, you can run:
2fas --help
If you simply run 2fas
or 2fas /path/to/file.2fas
, an interactive menu will show up.
If you only want a specific TOTP code, you can run 2fas <service>
or 2fas /path/to/file.2fas <service>
.
Multiple services can be specified: 2fas <service1> <service2> [/path/to/file.2fas]
.
Fuzzy matching is applied to (hopefully) catch some typo's.
You can run 2fas --all
to generate codes for all TOTP in your .2fas
file.
Settings
# see all settings:
2fas --settings # shortcut: -s
# see a specific setting:
2fas --setting key
# update a setting:
2fas --setting key value
The --settings
, --setting
or -s
flag can be used to read/write settings.
This can also be done from within the interactive menu.
As a Library
Please see the documentation of lib2fas-python for more details on using this as a Python library.
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file 2fas-1.0.3.tar.gz
.
File metadata
- Download URL: 2fas-1.0.3.tar.gz
- Upload date:
- Size: 63.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1f4a9ff4fe4ac5ce8ddf1ebc72208677adc5a85d098fe17ce7b109434db3549 |
|
MD5 | 704f1e9717ad4bccdda6bd4a352b53e2 |
|
BLAKE2b-256 | 12e770ffb119bab7fa79b79729bc905c43444129943f0d9bc5b281f4cdee3019 |
File details
Details for the file 2fas-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: 2fas-1.0.3-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a9830c96aeffbe7df7603c14fa50cd3a7636c679c3a352c6bd5dd2692678cd8 |
|
MD5 | f0f545843af4fcaa25423a307b8ad264 |
|
BLAKE2b-256 | 3f58ff16cfa37f49261280908d6d21670bb4f2376ace13a92bb815b2de58845a |