ABCParse
A better base class that handles parsing local arguments.
pip install ABCParse
from ABCParse import ABCParse
class SomeClass(ABCParse):
def __init__(self, arg1, arg2):
self.__parse__(kwargs=locals())
something = SomeClass(arg1 = 4, arg2 = "name")
Logging
ABCParse includes a built-in logging system that provides visibility into the parsing process. You can configure the logging level, format, and output destination.
Basic Usage
from ABCParse import set_global_log_level, get_logger
# Set the global log level
set_global_log_level("debug") # Options: debug, info, warning, error, critical
# Get a custom logger for your module
logger = get_logger(name="my_module")
logger.info("This is an info message")
logger.debug("This is a debug message")
Advanced Configuration
from ABCParse import get_logger
# Configure a logger with custom settings
logger = get_logger(
name="my_custom_logger",
level="debug",
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
date_format="%Y-%m-%d %H:%M:%S",
file_path="logs/my_app.log", # Optional: log to file
propagate=False
)
# Log messages at different levels
logger.debug("Detailed information for debugging")
logger.info("General information about program execution")
logger.warning("Warning about potential issues")
logger.error("Error that occurred during execution")
logger.critical("Critical error that may cause program failure")
# Log dictionary data
config = {"param1": 42, "param2": "value", "enabled": True}
logger.log_dict(config, level="debug", prefix="Configuration")
Metadata
Release files for ABCParse 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| abcparse-0.1.4.tar.gz | 25.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abcparse-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.4 kB
Release files / abcparse-0.1.4.tar.gz
| Download URL | abcparse-0.1.4.tar.gz |
|---|---|
| Size | 25.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdcd7ae6a20de91883a127513b0a1eb90b4b4abe5dd212d485e23186a07e3092
|
|
BLAKE2b-256 checksum How to use checksums |
9684fc66c410e87de20df2b79e8a5b77e5a96fe6b6c4e30f575623dbd914a176
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / abcparse-0.1.4-py3-none-any.whl
| Download URL | abcparse-0.1.4-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6489a5c958eb18ae213a21965a131848a8f3fdcef2fd82a3e774ab46c7a250d1
|
|
BLAKE2b-256 checksum How to use checksums |
cc5a0587c0d9acad063b60345c5f4ea7cbd80de2545ae283b489dec437d576c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|