flowstash-cli 0.2.5__tar.gz → 0.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/PKG-INFO +2 -2
  2. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/pyproject.toml +2 -2
  3. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/AGENTS.md +7 -3
  4. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_api_main.py +1 -1
  5. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_src/_worker/tasks/tasks.py +4 -4
  6. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/__init__.py +0 -0
  7. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/commands/__init__.py +0 -0
  8. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/commands/auth.py +0 -0
  9. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/commands/build.py +0 -0
  10. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/commands/deploy.py +0 -0
  11. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/commands/project.py +0 -0
  12. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/commands/run.py +0 -0
  13. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/commands/webhook.py +0 -0
  14. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/core/__init__.py +0 -0
  15. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/core/api_client.py +0 -0
  16. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/core/auth_server.py +0 -0
  17. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/core/builder.py +0 -0
  18. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/core/config.py +0 -0
  19. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/core/docker_utils.py +0 -0
  20. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/core/patcher.py +0 -0
  21. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/main.py +0 -0
  22. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/README.md +0 -0
  23. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_.dockerignore +0 -0
  24. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_.flowstash +0 -0
  25. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_config/[env]/(backend-asyncio)/backend.yaml +0 -0
  26. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_config/[env]/(backend-dramatiq)/backend.yaml +0 -0
  27. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_config/[env]/(backend-managed)/backend.yaml +0 -0
  28. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_config/[env]/_backend.yaml +0 -0
  29. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_config/shared/.env +0 -0
  30. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_config/shared/backend.yaml +0 -0
  31. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_config/shared/clients/demoClient.yaml +0 -0
  32. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_config/shared/clients.yaml +0 -0
  33. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_deployment/[env]/(backend-asyncio)/docker-compose.yaml +0 -0
  34. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_deployment/[env]/(backend-dramatiq)/docker-compose.yaml +0 -0
  35. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_deployment/[env]/.env +0 -0
  36. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_deployment/shared/.env +0 -0
  37. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_deployment/shared/api.Dockerfile +0 -0
  38. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_deployment/shared/worker.Dockerfile +0 -0
  39. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_pyproject.toml +0 -0
  40. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_src/_api/__init__.py +0 -0
  41. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_src/_api/_routes/webhooks.py +0 -0
  42. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_src/_shared/__init__.py +0 -0
  43. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_src/_shared/clients/client.py +0 -0
  44. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_src/_shared/models/models.py +0 -0
  45. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_src/_shared/tasks/sharedTasks.py +0 -0
  46. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_src/_worker/__init__.py +0 -0
  47. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/templates/_worker_main.py +0 -0
  48. {flowstash_cli-0.2.5 → flowstash_cli-0.2.6}/src/flowstash/cli/ui/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: flowstash-cli
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: CLI for the flowstash Managed Platform
5
5
  Author: juraj.bezdek@gmail.com
6
6
  Author-email: juraj.bezdek@gmail.com
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.11
10
10
  Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Programming Language :: Python :: 3.13
12
- Requires-Dist: flowstash-runtime (>=0.2.5,<0.3.0)
12
+ Requires-Dist: flowstash-runtime (>=0.2.6,<0.3.0)
13
13
  Requires-Dist: httpx (>=0.27.0)
14
14
  Requires-Dist: keyring (>=25.0.0)
15
15
  Requires-Dist: libcst (>=1.1.0)
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "flowstash-cli"
3
- version = "0.2.5"
3
+ version = "0.2.6"
4
4
  description = "CLI for the flowstash Managed Platform"
5
5
  authors = [{name = "juraj.bezdek@gmail.com", email = "juraj.bezdek@gmail.com"}]
6
6
  requires-python = ">=3.11"
7
7
  dependencies = [
8
- "flowstash-runtime>=0.2.5,<0.3.0",
8
+ "flowstash-runtime>=0.2.6,<0.3.0",
9
9
  "typer[all]>=0.12.0",
10
10
  "httpx>=0.27.0",
11
11
  "pyyaml>=6.0.1",
@@ -111,11 +111,15 @@ with integration_context(integration="my-int", integration_pipeline="pipe"):
111
111
 
112
112
  ## Making External Requests: Clients
113
113
 
114
- flowstash makes it easy to interact with external APIs via Clients. They handle setting Base URLs, automatic Authentication headers, observability tracing, and defaults out of the box.
114
+ flowstash makes it easy to interact with external APIs via Clients. **All client behavior—including authentication, base URLs, and retries—is driven by YAML configuration files.** This approach ensures that sensitive credentials and environment-specific settings are kept out of your code.
115
115
 
116
116
  ### Adding a Client
117
117
 
118
- To configure a new REST client, you place a configuration file (like `slackClient.yaml`) in your shared clients folder. flowstash dynamically loads these clients if your configuration registry points to the folder.
118
+ To use a client, you **must first** define its configuration in a YAML file (e.g., `config/shared/clients/slackClient.yaml`). flowstash uses these files to determine the base URL, authentication, and retry logic.
119
+
120
+ > [!IMPORTANT]
121
+ > **The Configuration File is Mandatory.**
122
+ > Every client you use via `get_client("myClient")` **must** have a corresponding configuration file. Without it, the client cannot be resolved. The name you pass to `get_client` must match either the filename (without extension) or the `client_id` specified inside the file.
119
123
 
120
124
  #### The `clients.yaml` Pointer
121
125
  The `clients.yaml` file in your shared configuration folder tells flowstash where to find your client definitions. Its schema is defined by `ClientsConfigPointer` in `flowstash.config.runtime_config`:
@@ -167,7 +171,7 @@ Once configured, you can retrieve the standard HTTP client (from the `flowstash.
167
171
  from flowstash.clients import get_client
168
172
  from flowstash.decorators import integration_task
169
173
 
170
- # Load the client configuration
174
+ # Resolves the client named "slackClient" (expects slackClient.yaml configuration)
171
175
  slack_client = get_client("slackClient")
172
176
 
173
177
  @integration_task(integration="slack", integration_pipeline="send_message")
@@ -8,7 +8,7 @@ env = os.getenv("ENVIRONMENT", "dev")
8
8
  config = load_config_dir("config", environment=env)
9
9
 
10
10
  # Create FastAPI app
11
- app = create_fastapi_app(config, auto_import=[Path(__file__).parent / "src" / "api" / "routes" / "webhooks.py"])
11
+ app = create_fastapi_app(config, auto_import=[Path(__file__).parent / "src" / "api" / "routes" ])
12
12
 
13
13
  @app.get("/health")
14
14
  async def health():
@@ -4,12 +4,12 @@ from flowstash.queue.backend import Schedule
4
4
 
5
5
 
6
6
 
7
- @integration_task(integration="demo", integration_pipeline="demo", default_schedule=Schedule(cron="* * * * *"))
8
- def demo_task(user_id: int):
7
+ @integration_task(integration="demo", integration_pipeline="demo", default_schedule=Schedule(cron="0 0 * * 0"))
8
+ def demo_task():
9
9
  """
10
- Task to process a user by ID.
10
+ Demo task to be executed weekly.
11
11
  """
12
- print(f"Processing user {user_id}...")
12
+ print(f"Processing user...")
13
13
 
14
14
 
15
15