#πŸ”’ Seeking Feedback: Python Module for Server-Client License Management

7 messages Β· Page 1 of 1 (latest)

icy matrix
#

I'm developing a Python module focused on server-client license management, and I'd love to get some feedback and suggestions from the community.

The module aims to provide a robust solution for handling software licenses between a server and its clients. It's designed to make license validation, activation, and deactivation straightforward and secure. Optionally, it can integrate with a web interface for easier administration.

Github link : https://github.com/CSDC-K/LMS
Pypi link : https://pypi.org/project/LMS-PYTHON/

GitHub

Contribute to CSDC-K/LMS development by creating an account on GitHub.

wispy falconBOT
#

@icy matrix

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

floral arrow
# icy matrix I'm developing a Python module focused on server-client license management, and ...

Perhaps the only thing I'd change here is these print statements in favor of a logging facility that's separate from your class:

    def send_msg(self, message: str, encoding: int = 8):
        try:
           self.client_socket.send(message.encode(encoding))
        except Exception as e:
            if self.error_output:
                print(f"[ERROR] send_msg: {e}")
            return
        if self.info_output:
            print(f"[OK] Message sent: {message}")

I'd consider narrowing the exception handler to a more specific error or otherwise log the entire exception (traceback and all) using traceback.print_exception or the tools of your logger.

Docstrings would be also appreciated.

icy matrix
#

thx for feedback

smoky heath
#

I'd move the HTML and JS out to a separate file. I don't think having a massive string in the function to hold all of that is a good idea.

wispy falconBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.