Registry / devops / args
library0.1.0pypiunverified

The 'args' library (version 0.1.0) by Kenneth Reitz is a minimalistic command-line argument parser designed to simplify access to arguments, flags, and assignments. Released in 2012, it provides a very basic interface for parsing command-line inputs. The library is considered abandoned, with its GitHub repository marked as an archive, and is no longer actively maintained. [2, 5]

pip install args
INSTALL
IMPORT
SIG · ARGS
A
args
devopsenv0.1.0
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.0 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

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

args
import args
from args import ...
The library primarily exposes functionality through the top-level 'args' module, not individual classes or functions.

This quickstart demonstrates how to import and use the 'args' library to access various categories of command-line inputs such as all arguments, flags (prefixed with '--'), file-like arguments, and key-value assignments.

import args import sys # Example usage for a script run as: python your_script.py arg1 --flag file.txt key=value # Simulate command-line arguments for demonstration if run without actual CLI args if len(sys.argv) == 1: # Only if the script is run without arguments, use a simulated set sys.argv.extend(['arg1', '--flag', 'file.txt', 'key=value']) print(f'Arguments passed in: {args.all}') print(f'Flags detected: {args.flags}') print(f'Files detected: {args.files}') print(f'NOT files detected: {args.not_files}') print(f'Grouped Arguments: {args.grouped}') print(f'Assignments detected: {args.assignments}')
Debug
Known issues
breakingThe `args` library (v0.1.0) uses Python 2 `print` statements in its examples and internal logic. Running it directly on Python 3 will result in `SyntaxError` or other compatibility issues due to the `print` function change. The project is effectively Python 2 only.
fix
This library is not compatible with Python 3. For modern Python, use the standard library `argparse` or a well-maintained third-party alternative. If absolutely necessary, adapt to Python 2 or manually port relevant code sections.
affects: All versions (0.1.0) when used with Python 3.x
deprecatedThe `args` library is an archived project by Kenneth Reitz and has not been updated since 2012 (PyPI release) / 2018 (last GitHub activity). It is considered unmaintained and should not be used for new projects. [2, 5]
fix
Migrate to `argparse` (Python standard library) for robust command-line parsing, or consider other actively maintained libraries like `click` or `docopt` for more advanced CLI applications. [3, 11]
affects: 0.1.0
gotchaThe `args` library offers a very simplistic parsing model, unlike `argparse`. It does not support explicit argument definitions, types, default values, or subcommands. It categorizes arguments based on simple patterns (e.g., `--` for flags, `=` for assignments, `.txt` for files by default). [2]
fix
Do not expect `args` to provide the rich functionality of `argparse`. Understand its limited parsing capabilities. For anything beyond basic argument inspection, `argparse` is the recommended standard. [9, 11]
affects: 0.1.0
Errors
Common errors & fixes
SyntaxError: Missing parentheses in call to 'print'
The library's examples and likely some internal logic are written using Python 2's `print` statement syntax, which is incompatible with Python 3's `print()` function.
fix
This library is fundamentally Python 2. Using it in Python 3 requires either a Python 2 environment or a significant rewrite of the library to update `print` statements and other potential incompatibilities. It is generally recommended to use modern alternatives.
AttributeError: 'module' object has no attribute 'some_named_argument'
The 'args' library does not parse named arguments (e.g., `--foo bar`) into directly accessible attributes like `args.foo`. It only provides broad categories like `args.all`, `args.flags`, `args.grouped`, and `args.assignments`. [2]
fix
Access arguments via the provided collections (`args.all`, `args.flags`, `args.assignments`). For structured argument parsing with named arguments, use Python's built-in `argparse` module, which allows defining specific arguments and accessing them by name. [9, 11]
Upgrade
Version history
0.1.0latest on PyPI · released May 8, 2012
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources

No resource links recorded.

args — pip install args · libregistry