Skip to main content

authenticatorpy

https://github.com/abdullahselek/authenticatorpy/workflows/authenticatorpy%20ci/badge.svg https://img.shields.io/pypi/v/authenticatorpy.svg https://img.shields.io/pypi/pyversions/authenticatorpy.svg https://codecov.io/gh/abdullahselek/authenticatorpy/branch/master/graph/badge.svg https://pepy.tech/badge/authenticatorpy

Linux

Windows

https://travis-ci.org/abdullahselek/authenticatorpy.svg?branch=master https://ci.appveyor.com/api/projects/status/vbbhr6naecm16ljv?svg=true

Introduction

A pure Python library which provides one time password like Google Authenticator. It works with Python versions Python 3.x.

Installing

You can install authenticatorpy using:

$ pip install authenticatorpy

Getting the code

The code is hosted at https://github.com/abdullahselek/authenticatorpy

Check out the latest development version anonymously with:

$ git clone git://github.com/abdullahselek/authenticatorpy.git
$ cd authenticatorpy

To install test dependencies, run either:

$ pip install -Ur requirements.testing.txt

Running Tests

The test suite can be run against a single Python version which requires pip install pytest and optionally pip install pytest-cov (these are included if you have installed dependencies from requirements.testing.txt)

To run the unit tests with a single Python version:

$ py.test -v

to also run code coverage:

$ py.test --cov=authenticatorpy

To run the unit tests against a set of Python versions:

$ tox

Sample Usage

Import Authenticator:

from authenticatorpy.authenticator import Authenticator

Initiation:

authenticator = Authenticator('abcd xyzw abcd xyzw abcd xyzw abcd xyzw')
password = authenticator.one_time_password()

And that’s it, you have the unique password.

Command Line Usage

With --secret parameter default 30 seconds regeneration interval:

python -m authenticatorpy --secret 'abcd xyzw abcd xyzw abcd xyzw abcd xyzw'

or additional --time parameter:

python -m authenticatorpy --secret 'abcd xyzw abcd xyzw abcd xyzw abcd xyzw' --time 15

Relevant RFCs

License

MIT License

Copyright (c) 2018 Abdullah Selek

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for authenticatorpy 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for authenticatorpy 0.3.1
File Interpreter ABI Platform
authenticatorpy-0.3.1-py3-none-any.whl Python 3 none any Details

Release files / authenticatorpy-0.3.1-py3-none-any.whl

Download URL authenticatorpy-0.3.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c58e96b258badda824221bd6dc40672ad92fbbde9c6c94455124e44d356b368
BLAKE2b-256 checksum
How to use checksums
4a0d99b5a78d6d66a59bd9f891aff8c8ba24e6615d658b7f842e8c9f091794ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.2

2 release files

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page