Verify the ownership of a Scratch account.
Reason this release was yanked:
Use scratch-verify instead.
Project description
scratch-verify
Verify the ownership of a Scratch account.
Install
pip install scratch-verify
Usage
from scratch_verify import create_code, verify_code
# The user should go to https://scratch.mit.edu/projects/440710593 and provide `code`
code = create_code()
# Verify if the user provided it
is_verified = verify_code(username, code)
API
scratch_verify.create_code()
Generate a verification code for the user to provide at https://scratch.mit.edu/projects/440710593. This is just a convenience method - you can use any numerical code. Returns a 6-digit number.
from scratch_verify import create_code
print(create_code())
#=> "435543"
scratch_verify.verify_code(username, code, completion_timeout?)
Verify whether the user is authenticated.
username
Type: string
The username to authenticate.
code
Type: string
The code to check for.
completion_timeout
Type: number
Default: Infinity
The maximum amount of seconds that can pass since the user provided the code before it is no longer accepted.
from scratch_verify import verify_code
# If the user has authenticated
print(verify_code("RichieNB", "435543"))
#=> True
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for scratch-verify-python-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 871ad155441bb65ef987d16a0c1695814f60c882a35dec9ec681e4e503dbc6a0 |
|
MD5 | 7783594d3fcafb3e6a2ba4be96cefbc8 |
|
BLAKE2b-256 | 8ad2bfcccc34e0c32ff5a1984b84955f75a5595510aa24daff741c4f9db61402 |
Close
Hashes for scratch_verify_python-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a937d5ce3b62ff579a39f6ebb54bc0e88fbf02a00c641af3475bec434896b6e5 |
|
MD5 | f92c2082d495490e37d84a5c13e5c593 |
|
BLAKE2b-256 | 0ddb13dfecef0b9e76842ddce8ce40095317c61e4079c734d18af0b5d39429b1 |