Registry / devops / argparse-logging

argparse-logging

JSON →
library2020.11.26pypypi✓ verified 80d ago

A simple library to configure logging from command line arguments when using argparse. Version 2020.11.26, last released in 2020 (no recent updates).

pip install argparse-logging
INSTALL
IMPORT
SIG · ARGPARSE-LOGGING
A
argparse-logging
devopspythonv2020.11.26
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2020.11.26 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

add_logging_arguments
from argparse_logging import add_logging_arguments
from argparse_logging import ArgparseLogging
LogLevelAction
from argparse_logging import LogLevelAction
LogFormatAction
from argparse_logging import LogFormatAction

Basic usage to integrate logging with argparse.

import argparse from argparse_logging import ArgparseLogging parser = argparse.ArgumentParser() ArgparseLogging(parser, log_level='info', log_format='%(asctime)s - %(levelname)s - %(message)s') args = parser.parse_args() # Now logging is configured from command line args (e.g., --log-level debug) import logging logging.getLogger().info('This is a test message')
Debug
Known issues
gotchaThe library hasn't been updated since 2020 and relies on older Python conventions. It may not work well with modern logging customizations.
fix
Consider using argparse's own argparse.ArgumentDefaultsHelpFormatter or manual logging configuration for more control.
affects: all
deprecatedNo official deprecation, but the library is effectively in maintenance mode with no active development. Breaking changes or compatibility issues with newer Python versions may arise.
fix
Migrate to custom argparse + logging setup for future-proofing.
affects: all
Upgrade
Version history
2020.11.26latest on PyPI · released Nov 26, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources
argparse-logging — pip install argparse-logging · libregistry