A package for interacting with the nLogin plugin
Project description
Integrate nLogin with your website, forum and/or store.
Installation
On PyPI: https://pypi.org/project/nlogin_py/
In terminal: pip install nlogin_py
Usage:
Instantiation
from nlogin_py import Nlogin
# Creates an instance
nlogin = Nlogin("localhost", "root", "", "nlogin", False)
Verifying the Password
from nlogin_py import Nlogin
# Creates an instance
nlogin = Nlogin("localhost", "root", "", "nlogin", False)
# Fetches the user identifier (search, mode)
user_id = nlogin.fetch_user_id("Player", Nlogin.FETCH_WITH_LAST_NAME)
# Verifies the password
is_valid = nlogin.verify_password(user_id, "password123")
Registering a Player
from nlogin_py import Nlogin
# Creates an instance
nlogin = Nlogin("localhost", "root", "", "nlogin", False)
# Registers a player (username, plain password, e-mail, mojang id (optional), bedrock id (optional))
success = nlogin.register("Player", "password123", "youremail@domain.com")
Changing the Password
from nlogin_py import Nlogin
# Creates an instance
nlogin = Nlogin("localhost", "root", "", "nlogin", False)
# Fetches the user identifier (search, mode)
user_id = nlogin.fetch_user_id("Player", Nlogin.FETCH_WITH_LAST_NAME)
# Changes the password (user identifier, new plain password)
success = nlogin.change_password(user_id, "newpassword123")
License
This project is licensed under the GNU General Public License v3.0.
Reference
I used a PHP package from the author of the nLogin plugin. My package is an almost exact copy written in Python.
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
nlogin_py-1.0.0.tar.gz
(6.5 kB
view details)
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 nlogin_py-1.0.0.tar.gz.
File metadata
- Download URL: nlogin_py-1.0.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31e887e89a6f432ebb7539029d6e516033d03c5999753ba96ef231fde4aca456
|
|
| MD5 |
ca5e0fbde9fc7aa21d555324b0016e1f
|
|
| BLAKE2b-256 |
bbf69a860c074c4fd3bd38b7d32aa7276aa4f282eb1cb5afdc5a2bb83cb52855
|
File details
Details for the file nlogin_py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: nlogin_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb95b67087bf985b392b1133da2d4be1e1aef8c9e0ad527b1b98e8ec1de58f15
|
|
| MD5 |
82f1e397e6f862f626ef2db30accd1a8
|
|
| BLAKE2b-256 |
a901e2487a5b7bf97cfde2a2865d7d33d91ee5349a4e35f3cac5886aa0d57321
|