Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ABCParse

Python Tests PyPI pyversions PyPI version Code style: black

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.0a2.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

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

abcparse-0.1.0a2-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file abcparse-0.1.0a2.tar.gz.

File metadata

  • Download URL: abcparse-0.1.0a2.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for abcparse-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 37a5ac124606bda1ac444cc4d2a8411ec30e49521620d4c94542358a21ed8c07
MD5 6859533c8c5eb6f5e3e475c76b578d40
BLAKE2b-256 66587a26420d011df6a4c3bb240c5b117791e6ef855adf1742a898b95fda6eb1

See more details on using hashes here.

File details

Details for the file abcparse-0.1.0a2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for abcparse-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 82a2c89b7afb26b673749c0d1bc7526fdca5889fccbff426b1bb48897ab75744
MD5 e0644744db4eaa08ae2846bdcd4b2acf
BLAKE2b-256 2c413672b00d306acdc15148843fd4b1585afb4d9782058cb286158a1df9276c

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