Cartorio: A library for logging
Project description
1. Cartorio
A wrapper on the logging
module for Python that provides a simple and easy-to-use interface for logging.
2. Contents
3. Installation
pip install cartorio
4. Documentation
https://cartorio.readthedocs.io/en/latest/
5. Usage
Consider that your project consists of two scripts:
parent.py
child/
└── child.py
An example of these scripts are:
# parent.py
from pathlib import Path
from cartorio import fun, log
from child.child import multiply
def main()
multiply(10, 1)
if __name__ == "__main__":
# Instantiation of log file
logger = log(filename=Path(__file__).resolve().stem, logs_path=Path(__file__).resolve().parent)
# where,
# filename (str, Path): Log file.
# logs_path (Path): Path where the log file is saved to.
main()
# child.py
from cartorio import fun, log
@fun
def multiply(num1, num2):
return num1 * num2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cartorio-2.0.10.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for cartorio-2.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12cb1c86b0d62e49f983d3498373171598e69853d0c2b3ac804e10a188c4ae3c |
|
MD5 | 45a3533914a6d5b904482036e0e284ff |
|
BLAKE2b-256 | 8a2d2acd7788cc57e305da8cf0fdc1d3b552ac56ea77a016801860621b7dadda |