Pre-release
This release is a pre-release and may not be stable for production use.
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")
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
abcparse-0.1.0a0.tar.gz
(25.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abcparse-0.1.0a0.tar.gz.
File metadata
- Download URL: abcparse-0.1.0a0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95d9f9fc74bbfff918ffc76b05a91c061ac193fcdf8adb1dd5ba565a2d9bd1d8
|
|
| MD5 |
d6ecb3589b0b753bd4887f15e73fee9c
|
|
| BLAKE2b-256 |
a9a0b907029c9cc16c72f65c87a7a405bbfd85ae1a066fad41a41100fa786ff6
|
File details
Details for the file abcparse-0.1.0a0-py3-none-any.whl.
File metadata
- Download URL: abcparse-0.1.0a0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7940e9f73aa94cbd80c6aeaf16992bdb31ff626ef287559fd1e8775eae9f829
|
|
| MD5 |
1fe229121a8466dd7dad1fd3432e01cb
|
|
| BLAKE2b-256 |
6f3f495dc7bd63544cd9cfa92237dd1cb31c46d8849a3fd924bf8784b1457a8f
|