Add ArgumentAction.ACTION, support POSIX bundling in CAP, Move all Actions to their own file
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import asyncio
|
||||
|
||||
from falyx import Action, ActionGroup, ChainedAction
|
||||
from falyx.action import Action, ActionGroup, ChainedAction
|
||||
|
||||
|
||||
# Actions can be defined as synchronous functions
|
||||
|
@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
|
||||
from falyx import Action, ActionGroup, Command, Falyx
|
||||
from falyx import Falyx
|
||||
from falyx.action import Action, ActionGroup
|
||||
|
||||
|
||||
# Define a shared async function
|
||||
@ -19,10 +20,11 @@ action3 = Action("say_hello_3", action=say_hello)
|
||||
# Combine into an ActionGroup
|
||||
group = ActionGroup(name="greet_group", actions=[action1, action2, action3])
|
||||
|
||||
# Create the Command with auto_args=True
|
||||
cmd = Command(
|
||||
flx = Falyx("Test Group")
|
||||
flx.add_command(
|
||||
key="G",
|
||||
description="Greet someone with multiple variations.",
|
||||
aliases=["greet", "hello"],
|
||||
action=group,
|
||||
arg_metadata={
|
||||
"name": {
|
||||
@ -33,7 +35,4 @@ cmd = Command(
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
flx = Falyx("Test Group")
|
||||
flx.add_command_from_command(cmd)
|
||||
asyncio.run(flx.run())
|
||||
|
@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
|
||||
from falyx import Action, ChainedAction, Falyx
|
||||
from falyx import Falyx
|
||||
from falyx.action import Action, ChainedAction
|
||||
from falyx.utils import setup_logging
|
||||
|
||||
setup_logging()
|
||||
|
@ -2,8 +2,8 @@ import asyncio
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from falyx import ActionGroup, Falyx
|
||||
from falyx.action import HTTPAction
|
||||
from falyx import Falyx
|
||||
from falyx.action import ActionGroup, HTTPAction
|
||||
from falyx.hooks import ResultReporter
|
||||
|
||||
console = Console()
|
||||
|
@ -1,8 +1,7 @@
|
||||
import asyncio
|
||||
|
||||
from falyx import Action, ActionGroup, ChainedAction
|
||||
from falyx import ExecutionRegistry as er
|
||||
from falyx import ProcessAction
|
||||
from falyx.action import Action, ActionGroup, ChainedAction, ProcessAction
|
||||
from falyx.retry import RetryHandler, RetryPolicy
|
||||
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
from rich.console import Console
|
||||
|
||||
from falyx import Falyx, ProcessAction
|
||||
from falyx import Falyx
|
||||
from falyx.action import ProcessAction
|
||||
from falyx.themes import NordColors as nc
|
||||
|
||||
console = Console()
|
||||
|
@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
|
||||
from falyx import Action, Falyx
|
||||
from falyx import Falyx
|
||||
from falyx.action import Action
|
||||
|
||||
|
||||
async def main():
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
import asyncio
|
||||
|
||||
from falyx import Action, ChainedAction, Falyx
|
||||
from falyx.action import ShellAction
|
||||
from falyx import Falyx
|
||||
from falyx.action import Action, ChainedAction, ShellAction
|
||||
from falyx.hooks import ResultReporter
|
||||
from falyx.utils import setup_logging
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import asyncio
|
||||
import random
|
||||
|
||||
from falyx import Action, ChainedAction, Falyx
|
||||
from falyx import Falyx
|
||||
from falyx.action import Action, ChainedAction
|
||||
from falyx.utils import setup_logging
|
||||
|
||||
setup_logging()
|
||||
|
@ -1,7 +1,8 @@
|
||||
import asyncio
|
||||
import random
|
||||
|
||||
from falyx import Action, ChainedAction, Falyx
|
||||
from falyx import Falyx
|
||||
from falyx.action import Action, ChainedAction
|
||||
from falyx.utils import setup_logging
|
||||
|
||||
setup_logging()
|
||||
|
Reference in New Issue
Block a user