Name | pyauthenticator JSON |
Version |
0.2.1
JSON |
| download |
home_page | None |
Summary | Similar to the Google authenticator just written in python. |
upload_time | 2025-07-09 14:27:43 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | BSD-3-Clause |
keywords |
2fa
mfa
authenticator
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# pyauthenticator
[](https://github.com/jan-janssen/pyauthenticator/actions/workflows/unittest.yml)
[](https://coveralls.io/github/jan-janssen/pyauthenticator?branch=main)
[](https://github.com/psf/black)
Similar to the Google authenticator just written in Python. With more and more services requiring two factor
authentication without supporting application specific passwords or other forms of token based authenication
suitable for automation this python packages allows to generate two factor authentication codes on the commandline
or in python.

# For Users
## Installation
Install `pyauthenticator` via conda:
```
>>> conda install -c conda-forge pyauthenticator
```
Alternatively, `pyauthenticator` can also be installed via pip:
```
>>> pip install pyauthenticator
```
## Command Line
Get help how to use `pyauthenticator` using the `--help/-h` option:
```
>>> pyauthenticator --help
usage: pyauthenticator [-h] [-qr] [-a ADD] service
positional arguments:
service Service to generate optauth code for. Currently no
service is defined in the ~/.pyauthenticator config file.
options:
-h, --help show this help message and exit
-qr, --qrcode Generate qrcode as <service.png> file.
-a ADD, --add ADD Add service by providing the <qrcode.png> file as
additional argument.
```
Add `google` as new service after saving the qrcode to `Screenshot 2023-07-02 at 12.45.09.png` to your desktop:
```
>>> pyauthenticator google --add ~/Desktop/Screenshot\ 2023-07-02\ at\ 12.45.09.png
The service 'google' was added, from file </Users/jan/Desktop/Screenshot 2023-07-02 at 12.45.09.png>
```
Afterwards, new authentication codes can be generated for the service `google` using:
```
>>> pyauthenticator google
087078
```
Beyond google, `pyauthenticator` works for any service which implements the two factor authentication.
If you mistype the name of the service, then `pyauthenticator` suggests alternative options:
```
>>> pyauthenticator googel
The service "googel" does not exist.
The config file ~/.pyauthenticator contains the following services:
* google
Choose one of these or add a new service using:
pyauthenticator --add <qr-code.png> <servicename>
```
## Support
For any support requests feel free to open an [issue on Github](https://github.com/jan-janssen/pyauthenticator/issues).
# For Developers
## Python Interface
The same functionality which is available on the command line is also available via the python interface:
```
from pyauthenticator import get_two_factor_code
get_two_factor_code(service)
```
So `pyauthenticator` can be integrated in existing python packages which need access to resources protected by two
factor authentication.
## Configuration
The configuration is stored in `~/.pyauthenticator` it is written in the JSON format. For a given service like `github`
the config file contains:
```
{"google": "otpauth://totp/Google:<username>?secret=<secret>&issuer=Google"}
```
With the Google username `<username>` and the corresponding secret `<secret>` being contained in the QR code.
## License
The `pyauthenticator` package is licensed under the [BSD-3-Clause license](https://github.com/jan-janssen/pyauthenticator/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "pyauthenticator",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "2FA, MFA, authenticator",
"author": null,
"author_email": "Jan Janssen <jan.janssen@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/cf/14/76a157a586a4936c868b2ae8cd36c4d93bbb94ecdec21b591cfcdacec7c0/pyauthenticator-0.2.1.tar.gz",
"platform": null,
"description": "# pyauthenticator\n[](https://github.com/jan-janssen/pyauthenticator/actions/workflows/unittest.yml)\n[](https://coveralls.io/github/jan-janssen/pyauthenticator?branch=main)\n[](https://github.com/psf/black)\n\nSimilar to the Google authenticator just written in Python. With more and more services requiring two factor\nauthentication without supporting application specific passwords or other forms of token based authenication\nsuitable for automation this python packages allows to generate two factor authentication codes on the commandline\nor in python.\n\n \n\n# For Users \n## Installation\nInstall `pyauthenticator` via conda:\n```\n>>> conda install -c conda-forge pyauthenticator\n```\n\nAlternatively, `pyauthenticator` can also be installed via pip:\n```\n>>> pip install pyauthenticator\n```\n\n## Command Line\nGet help how to use `pyauthenticator` using the `--help/-h` option:\n```\n>>> pyauthenticator --help\n\nusage: pyauthenticator [-h] [-qr] [-a ADD] service\n\npositional arguments:\n service Service to generate optauth code for. Currently no\n service is defined in the ~/.pyauthenticator config file.\n\noptions:\n -h, --help show this help message and exit\n -qr, --qrcode Generate qrcode as <service.png> file.\n -a ADD, --add ADD Add service by providing the <qrcode.png> file as\n additional argument.\n```\n\nAdd `google` as new service after saving the qrcode to `Screenshot 2023-07-02 at 12.45.09.png` to your desktop:\n```\n>>> pyauthenticator google --add ~/Desktop/Screenshot\\ 2023-07-02\\ at\\ 12.45.09.png\n\nThe service 'google' was added, from file </Users/jan/Desktop/Screenshot 2023-07-02 at 12.45.09.png>\n```\n\nAfterwards, new authentication codes can be generated for the service `google` using:\n```\n>>> pyauthenticator google\n\n087078\n```\nBeyond google, `pyauthenticator` works for any service which implements the two factor authentication. \n\nIf you mistype the name of the service, then `pyauthenticator` suggests alternative options:\n```\n>>> pyauthenticator googel\n\nThe service \"googel\" does not exist.\n\nThe config file ~/.pyauthenticator contains the following services:\n * google\n\nChoose one of these or add a new service using:\n pyauthenticator --add <qr-code.png> <servicename>\n```\n\n## Support \nFor any support requests feel free to open an [issue on Github](https://github.com/jan-janssen/pyauthenticator/issues). \n\n# For Developers \n## Python Interface\nThe same functionality which is available on the command line is also available via the python interface:\n```\nfrom pyauthenticator import get_two_factor_code\nget_two_factor_code(service)\n```\nSo `pyauthenticator` can be integrated in existing python packages which need access to resources protected by two \nfactor authentication. \n\n## Configuration\nThe configuration is stored in `~/.pyauthenticator` it is written in the JSON format. For a given service like `github`\nthe config file contains:\n```\n{\"google\": \"otpauth://totp/Google:<username>?secret=<secret>&issuer=Google\"}\n```\nWith the Google username `<username>` and the corresponding secret `<secret>` being contained in the QR code.\n\n## License \nThe `pyauthenticator` package is licensed under the [BSD-3-Clause license](https://github.com/jan-janssen/pyauthenticator/blob/main/LICENSE). ",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Similar to the Google authenticator just written in python.",
"version": "0.2.1",
"project_urls": {
"Documentation": "https://github.com/jan-janssen/pyauthenticator/blob/master/README.md",
"Homepage": "https://github.com/jan-janssen/pyauthenticator",
"Source": "https://github.com/jan-janssen/pyauthenticator",
"Tracker": "https://github.com/jan-janssen/pyauthenticator/issues"
},
"split_keywords": [
"2fa",
" mfa",
" authenticator"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "efacb570998086348c02af40f10c816f7dee60b9a3cf9a0893b587e20e928771",
"md5": "ea749270f082791cb1395ca16fa023a0",
"sha256": "e12e2aaed9dd99f8e3ac1e8a2fb9748ede8aa578e3a980ee6c0ea1e655f197b0"
},
"downloads": -1,
"filename": "pyauthenticator-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ea749270f082791cb1395ca16fa023a0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7371,
"upload_time": "2025-07-09T14:27:42",
"upload_time_iso_8601": "2025-07-09T14:27:42.284727Z",
"url": "https://files.pythonhosted.org/packages/ef/ac/b570998086348c02af40f10c816f7dee60b9a3cf9a0893b587e20e928771/pyauthenticator-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cf1476a157a586a4936c868b2ae8cd36c4d93bbb94ecdec21b591cfcdacec7c0",
"md5": "b0b10d42c122ca7984d2d5fda2f9c9c0",
"sha256": "a927a361f785073ba92b1ed6a2029170ec55918252e82381560a2bb26b136e46"
},
"downloads": -1,
"filename": "pyauthenticator-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "b0b10d42c122ca7984d2d5fda2f9c9c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 5508,
"upload_time": "2025-07-09T14:27:43",
"upload_time_iso_8601": "2025-07-09T14:27:43.434545Z",
"url": "https://files.pythonhosted.org/packages/cf/14/76a157a586a4936c868b2ae8cd36c4d93bbb94ecdec21b591cfcdacec7c0/pyauthenticator-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 14:27:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jan-janssen",
"github_project": "pyauthenticator",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "pyauthenticator"
}