Skip to main content

A package for interacting with the nLogin plugin

Project description

Installation

On PyPI: https://pypi.org/project/nlogin_py/

In terminal: pip install nlogin_py

Usage:

  1. Instantiating the nLogin class
  2. Verifying the Password
  3. Registering a Player
  4. Changing the Password

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nlogin_py-1.0.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for nlogin_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 31e887e89a6f432ebb7539029d6e516033d03c5999753ba96ef231fde4aca456
MD5 ca5e0fbde9fc7aa21d555324b0016e1f
BLAKE2b-256 bbf69a860c074c4fd3bd38b7d32aa7276aa4f282eb1cb5afdc5a2bb83cb52855

See more details on using hashes here.

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

Hashes for nlogin_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb95b67087bf985b392b1133da2d4be1e1aef8c9e0ad527b1b98e8ec1de58f15
MD5 82f1e397e6f862f626ef2db30accd1a8
BLAKE2b-256 a901e2487a5b7bf97cfde2a2865d7d33d91ee5349a4e35f3cac5886aa0d57321

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page