Registry / web-framework / naked
library0.1.32pypypi✓ verified 21d ago

Naked is a MIT licensed Python command line application framework that is currently in development, described as an 'early stable testing version'. It provides an executable for project generation, testing, profiling, and distribution to PyPI, alongside a Python library featuring an easy-to-use command-line string object parser and numerous Python type/method/function extensions. The current version is 0.1.32, released on November 6, 2022. The project maintains an active status with ongoing development, though users are advised to anticipate potential breaking changes.

pip install Naked
INSTALL
IMPORT
SIG · NAKED
N
naked
web-frameworkpythonv0.1.32
Install
2.2s avg
Import
Disk
27MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.32 · 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 · 28.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.2s · import 0.000s · 30MB
27MB installed
● package 27MB
Code
Verified usage

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

Command
from Naked.commandline import Command
from naked import Command
The top-level package is `Naked` (capitalized) and contains submodules like `commandline` and `toolshed`. Direct import from `naked` (lowercase) or `naked.commandline` will fail if `naked` refers to the top-level package object rather than the submodule.
execute
from Naked.toolshed.shell import execute
from naked.shell import execute
Toolshed utilities are under `Naked.toolshed`. For compiled C versions, use `from Naked.toolshed.c.shell import execute` (requires compilation).

This quickstart demonstrates parsing command-line arguments using `Naked.commandline.Command`. It simulates command-line input and checks for a primary command ('hello'), a secondary command ('world'), and an option ('--print').

import sys from Naked.commandline import Command # Simulate command-line arguments for demonstration # In a real application, sys.argv would be populated by the shell. # For example, to run this: python your_script.py hello world --print sys.argv = ['your_script.py', 'hello', 'world', '--print'] c = Command(sys.argv[0], sys.argv[1:]) if c.cmd == 'hello' and c.cmd2 == 'world': if c.option('--print'): print('Hello World from Naked!') else: print('Hello World (without --print) from Naked!') else: print('Invalid command. Try: hello world --print')
naked --version
Debug
Known issues
breakingNaked is in 'early stable testing version' and the developers explicitly warn that 'things may break'. Users should expect potential breaking changes between minor or patch versions.
fix
Monitor the GitHub repository for updates and release notes. Pin exact versions in `requirements.txt` and review changes before upgrading.
affects: 0.1.0 to latest (0.1.32)
gotchaThe project lists support for Python 2.6, 2.7, and Python 3.3. While it might function on newer Python 3 versions, explicit compatibility is only guaranteed up to Python 3.3. Running on much newer Python versions (e.g., Python 3.8+) may lead to unforeseen compatibility issues, as Python 3.3 is quite old and Python 2 is end-of-life.
fix
Test the library thoroughly on your target Python 3 version. If issues arise, consider contributing fixes or using a Python environment within the explicitly supported range (Python 2.6, 2.7, 3.3).
affects: All versions of Naked on Python 3.4+.
gotchaAvoid naming your own Python files or modules 'naked.py' or 'Naked.py' in your project's `PYTHONPATH`. This can lead to import conflicts where Python imports your local module instead of the installed `Naked` package, causing `ModuleNotFoundError` or unexpected behavior when trying to import submodules like `Naked.commandline`.
fix
Use unique names for your local files and modules that do not conflict with installed packages.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'Naked'
The 'naked' library is not installed in your Python environment or the environment where your script is being run.
fix
Install the 'naked' library using pip: `pip install Naked`
ModuleNotFoundError: No module named 'Naked.toolshed.shell'
A specific submodule of the 'naked' library, such as 'Naked.toolshed.shell', cannot be found, often due to a typo in the import statement or an incomplete installation.
fix
Ensure the 'naked' library is correctly installed and that the import statement matches the exact module path documented in the 'naked' library (e.g., `from Naked.toolshed.shell import execute`).
AttributeError: 'module' object has no attribute 'main'
This error occurs when a user attempts to call a `main` function on a 'naked' module (or any Python module) that does not expose such a function directly, or if they try to execute an internal module incorrectly as a top-level script.
fix
Refer to the 'naked' documentation for the correct way to invoke its functionalities. Most 'naked' operations are performed via the `naked` command-line executable or by instantiating specific classes like `Naked.commandline.Command` within your Python script, rather than directly calling a `main` function on an imported module.
AttributeError: 'Command' object has no attribute 'option_with_arg'
You are attempting to access a method or attribute on a `Naked.commandline.Command` object that either does not exist, is misspelled, or has been changed in a different version of the library.
fix
Consult the `Naked.commandline` documentation for the correct method names and usage for `Command` objects (e.g., `c.option_with_arg('-f')`). Verify that the method name is correct and that your code is compatible with the installed 'naked' version.
Upgrade
Version history
0.1.32latest on PyPI · released Nov 6, 2022
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
7
Resources
naked — pip install naked · libregistry