Skip to main content

Utility functions and logging system.

Project description

pyLogicx

pyLogicx is a Python library that provides utility functions for text processing and a configurable logging system. It is designed to assist developers with common text manipulation tasks while also providing a robust logging mechanism to track application behavior.

Features

  • Logging Functionality:
    • Configurable logging levels (DEBUG, INFO, WARNING, ERROR) to track function calls and errors.
    • Output logs to console or a specified log file.

Installation

You can install the library using pip:

pip install pyLogicx

Usage

Importing the Library

You can import the utility functions and the logger as follows:

from pyLogicx.utils import track_time
from pyLogicx.logger import logger, set_log_level

Setting Log Level

You can configure the logging level at the beginning of your application:

set_log_level('DEBUG')  # Options: DEBUG, INFO, WARNING, ERROR

Example Functions

1. Count Words

This function tracks the time of function execution.

@track_time
def process_data():
    # Your code here

Logging Example

You can log messages at various levels using the logger & stored to the logger file:

logger.debug("This is a debug message.")
logger.info("This is an info message.")
logger.warning("This is a warning message.")
logger.error("This is an error message.")

Running Tests

To ensure that the library works as intended, you can run the tests located in the tests/ directory.

pytest tests/

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvements, feel free to submit an issue or a pull request.

License

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

Contact

For any inquiries, you can reach me at prasadchavan1203@gmail.com.

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

pyLogicx-0.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

pyLogicx-0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pyLogicx-0.2.tar.gz.

File metadata

  • Download URL: pyLogicx-0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.2

File hashes

Hashes for pyLogicx-0.2.tar.gz
Algorithm Hash digest
SHA256 506fe875f9c5977218eaa369e7cf086510a7b7856ffeaf3a01d1e0e885b6637b
MD5 79e9f1b9d686d903e79715686995c172
BLAKE2b-256 ba44ff29f271a38eb9dd223bdde3713464a192fbf02fe968f8c5ce7fd3108087

See more details on using hashes here.

File details

Details for the file pyLogicx-0.2-py3-none-any.whl.

File metadata

  • Download URL: pyLogicx-0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.2

File hashes

Hashes for pyLogicx-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a621fd813a3b9e8031b2a5319dadc8172c153044df9847e349a6eee0e63538d
MD5 32ecc47bfbf301b849228598b57fc56b
BLAKE2b-256 20141e1cf864a22e33b4da90000b2fceb2067b1de2216af01404029586876681

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