Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
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.
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.
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.
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.
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() # ...
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.$ pip install maxmods
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.
FAQs
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.
We found that maxmods demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.