Skip to main content

SpookyOTP

Lightweight Python package for TOTP/HOTP (Google Authenticator) codes

Description

This is a lightweight package for generating TOTP and HOTP codes used for two-factor authentication. They can be used with Google Authenticator or FreeOTP.

Some features (such as using different hashing algorithms or displaying more than 6 digits) do not work with Google Authenticator.

URIs generated (and QR codes encoding them) follow the Google Authenticator format

Example

from spookyotp import (get_random_secret, TOTP, from_uri)

secret = get_random_secret(n_bytes=10)
totp = TOTP(secret, 'Example', 'user@example.org')
totp.save_qr_code('qr.png')

# you can now load the QR code with your app of choice
code = input("Enter code: ")  # or raw_input in Python 2
matches = totp.compare(code)
if matches:
    print("Correct!")
else:
    print("Incorrect.")

# serialization and deserialization is supported via URI
uri = totp.get_uri()
new_totp = from_uri(uri)

Why Spooky?

I created the git repo on Halloween, and there is already a project called PyOTP.

Metadata

Release files for SpookyOTP 1.1.4

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

Source distribution (sdist)

Source distribution for SpookyOTP 1.1.4
File Size Uploaded Provenance
SpookyOTP-1.1.4.tar.gz 7.0 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for SpookyOTP 1.1.4
File Interpreter ABI Platform
SpookyOTP-1.1.4-py3.7.egg Legacy Egg format - - Details
SpookyOTP-1.1.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 27.6 kB

Release files / SpookyOTP-1.1.4.tar.gz

Download URL SpookyOTP-1.1.4.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8e3495f76293e0e5f5cd1816a9861b4b8bbe17985fe1a1bea885f8fa83883356
BLAKE2b-256 checksum
How to use checksums
2f3db7c544c5ff54b59c3cfc1cd9f6c5aeda32a4c395818454eaabfedba078da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release files / SpookyOTP-1.1.4-py3.7.egg

Download URL SpookyOTP-1.1.4-py3.7.egg
Size 13.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
a16e98e9fdbfa9165196c34bdb7650ba5e9c9b1ea1199e488d5385215834e4de
BLAKE2b-256 checksum
How to use checksums
574e2963a365d257f0187fe6e3ea2777ed7ea0d248559db83900d640fdc6e583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release files / SpookyOTP-1.1.4-py2.py3-none-any.whl

Download URL SpookyOTP-1.1.4-py2.py3-none-any.whl
Size 7.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7e49028a2be1be42b16de42183bc301c1d71233f4dcb8e7faed575b4686f5fdf
BLAKE2b-256 checksum
How to use checksums
3c475779e0435eb5ee3c3eb14e18e44a559cbbb869d01cc49c29553b209b345a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Security for SpookyOTP 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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