Python bindings for UserKit: user login and account management
Project description
Python UserKit
Summary
A UserKit client library for Python 3.
Installation
You can use pip to install userkit:
pip install userkit
Or download, then copy or symlink the userkit-python/userkit sub-directory into
your project.
Documentation
For full examples and docs checkout UserKit documentation.
Example usage
import userkit
uk = userkit.UserKit("<YOUR_APP_SECRET_KEY>")
# Create a user
user = uk.users.create_user(email="jane.smith@example.com",
password="secretpass")
# Fetch a user
user = uk.users.get_user("<USER_ID>")
# Update a user
user = uk.users.update_user("<USER_ID>", name="Jane Smith")
# Login a user
session = uk.users.login_user("jane.smith@example.com", "secretpass")
# Fetch a logged in user by their session-token
user = uk.users.get_current_user(session.token)
if user:
print("User is logged in:")
print(user)
else:
print("No logged in user, invalid session token")
Test
To run tests you need to create a test-app.
Set the USERKIT_KEY environment variable to your test app key, then
run python's unittest:
USERKIT_KEY=<YOUR_APP_SECRET_KEY> python -m unittest discover
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file userkit-1.0.0.tar.gz.
File metadata
- Download URL: userkit-1.0.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eec2aa0c5230d5a0b0489fc1dfded157ee69aee85aa807ed126236eb5b086e72
|
|
| MD5 |
6917c4896ff876bac6692911222e96ca
|
|
| BLAKE2b-256 |
25057039ed4f6e4364300c01eac84c39022ce6e640d565157e759e68eb3fd0c6
|
File details
Details for the file userkit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: userkit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ec2f688ac507564939a1323dd197d6d67876cc17c3c3a3e49fb3dc1ca963aaa
|
|
| MD5 |
53c17c64d22e7ff9571f1719aadb8708
|
|
| BLAKE2b-256 |
aac3eb13b552e1ecdfc4239d1241eebfc8776d6a2c23b8af17e7a206d4ea2a01
|