Skip to content

Add Custom Logger and types for better data handling, type checking a… #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Einswilli
Copy link

✨ Pull Request – Strong Typing & Basic Logging Module

Hi team 👋,

This PR introduces two key improvements aimed at increasing the quality, maintainability, and robustness of the SDK:


1. 🧾 Added types.py for Strong Typing

  • Introduces explicit types for more fine-grained control over data structures.
  • Improves type safety and consistency, making the codebase easier to navigate and work with (especially for IDEs and tools like MyPy).
  • Lays a solid foundation for future enhancements and scalability.

2. 🪵 Introduced a Basic Logging Module

  • Adds a simple but extensible logging system, including a configuration model (LoggingConfig) and a dedicated logger class (KKiaPayLogger).
  • Enables better tracking of key events such as payments, refunds, API calls, and webhook receptions.
  • Prepared to support more complex or asynchronous environments in the future.

🛠️ Why This Is Split

Initially, I intended to include a larger refactor (better flexibility, extensibility, robustness, and structural consistency) in this single PR.
However, to make review, testing, and discussion easier, I decided to split it into smaller, focused pull requests.

Upcoming PRs will include:

  • A more modular SDK structure.
  • Clean integration with the httpx client.
  • Improved error handling and typed API responses.
  • More flexible configuration and extension mechanisms.

Looking forward to your feedback, and thank you! 🙏

Einswilli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant