Skip to main content

A library for logging and error handling

Project description

Monologix

PyPI version Python Versions

Monologix is a Python library designed to enhance function execution with logging capabilities and result handling inspired by functional programming paradigms like monads and Rust's Result type.

Features

  • Logging Decorator: Wraps functions to log information about their execution, errors, and results.
  • Result Type: Implements a Result class for handling function outcomes, mimicking Rust's Result type or Haskell's Maybe type.
  • Monadic Logging: Provides a decorator that can act like a monad for logging, allowing for easy chaining of operations with built-in error handling and logging.

Installation

From PyPI

pip install monologix

Usage

Basic Logging with log_monad

Result Handling

Contributing

Contributions are welcome! Here's how you can contribute:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Create a new Pull Request

Please ensure your code adheres to the project's style guide and includes tests.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

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

monologix-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

monologix-0.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file monologix-0.1.0.tar.gz.

File metadata

  • Download URL: monologix-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for monologix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b6303116fc7989bc718cf1d7f99707824c57ac8d89c8e041a6fc22cb716478a0
MD5 c23383cdf2e6e982b6793460f7d95495
BLAKE2b-256 780217e8a8f533a5ad26c9d50603c9bd5cc08a34a687998e77ede89ce1cda30c

See more details on using hashes here.

File details

Details for the file monologix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: monologix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for monologix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4069af42fde2776c934e766f1e6f006295ba4eb002898f0f38827490c999831
MD5 a1bf5b374f1d434380a3cc1dc0fdea48
BLAKE2b-256 d4184578e8a289706b3489dfa055a21458ab84158dbbac356e32067cc63bbcbb

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