Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

maxmods

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maxmods

A collection of tools and utilities for Python. It includes modules for authentication, menus, and more. The library is released under the MIT License and the documentation is generated by an AI trained by OpenAI.

  • 0.5.0
  • PyPI
  • Socket score

Maintainers
1

maxmods

maxmods is a collection of tools for user authentication and data management. The library is released under the MIT License and the documentation is generated by an AI trained by OpenAI.

maxmods.auth

The maxmods.auth module provides a simple way to handle user authentication and data storage on a remote server. The AuthSesh class allows users to sign up, log in, and manage their data on the server.

Usage

To use the AuthSesh class, you first need to create an instance of the class and set the username and password:

from maxmods.auth import AuthSesh auth = AuthSesh() auth.set_vals("username", "password")

Once the username and password are set, you can use the login() method to log in to the server:

auth.login()

If the login is successful, you can use the save() and load() methods to save and load data from the server. For example:

auth.save("user_data/profile", {"name": "John Doe", "email": "johndoe@example.com"}) user_data = auth.load("user_data/profile")

When you are done with the instance, you have to use the terminate() method to end the connention with the server:

auth.terminate()

Note: If you do not do this, nothing you do on the server will save.

The AuthSesh class also provides methods for signing up new users, removing users, and terminating the session. For more details and examples, see the AuthSesh class documentation.

Context Manager

The AuthSesh class can be used as a context manager to automatically log out and terminate the session when the context ends:

from maxmods.auth import AuthSesh

with AuthSesh() as auth: auth.set_vals("username", "password") auth.login() # ...

Exceptions

The AuthSesh class raises the following exceptions:

  • AuthenticationError: Raised if there is an error authenticating the user.
  • DataError: Raised if there is an error accessing or modifying the data on the server.
  • LocationError: Raised if the specified location does not exist on the server.
  • PasswordError: Raised if the password is incorrect or invalid.
  • UsernameError: Raised if the username is invalid or already in use.

Installation

$ pip install maxmods

License and Disclaimer

The maxmods library is licensed under the MIT License, which means it is free to use and distribute for both personal and commercial purposes. The documentation for the library has been generated by an AI trained by OpenAI, and may not be entirely accurate or up-to-date. It is recommended to consult the source code for the library for the most accurate information.

Authors

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc