Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8f740c5
⚙️ FEATURE: Queue
FernandoCelmer Aug 13, 2025
fb63b34
⚙️ FEATURE: New flow
FernandoCelmer Aug 13, 2025
7c7bc64
⚙️ FEATURE: Code API Improvement
FernandoCelmer Aug 13, 2025
4a5f500
⚙️ FEATURE: Code API Improvement
FernandoCelmer Aug 13, 2025
fffafbb
❤️️ TEST: Updated
FernandoCelmer Aug 16, 2025
0654d4a
Merge branch 'develop' into feature/queue
FernandoCelmer Aug 16, 2025
04e8273
❤️️ TEST: Updated
FernandoCelmer Aug 16, 2025
793b8ae
❤️️ TEST: Updated
FernandoCelmer Aug 16, 2025
21dd54a
⚙️ GIT: Submodule
FernandoCelmer Aug 18, 2025
f400b33
⚙️: FEATURE: Updated
FernandoCelmer Aug 18, 2025
4dcd1a6
⚙️ FEATURE: Log structure improvement
FernandoCelmer Aug 18, 2025
1f9bd5a
⚙️ FEATURE: Log structure improvement
FernandoCelmer Aug 18, 2025
3775e8f
⚙️ FEATURE: Log structure improvement
FernandoCelmer Aug 18, 2025
2c0c15b
⚙️ FEATURE: Improvement of nomenclature and data types
FernandoCelmer Aug 18, 2025
46e2ca8
📘 DOCS: Update
FernandoCelmer Aug 18, 2025
68bdc64
⚙️ FEATURE: Plugin for dynamic logs included
FernandoCelmer Aug 19, 2025
b5af4ca
⚙️ FEATURE: Config Class Improvement
FernandoCelmer Aug 19, 2025
3c6c7f0
⚙️ FEATURE: Dotflow Class Improvement
FernandoCelmer Aug 19, 2025
5eb7468
❤️ TEST: Updated unit tests
FernandoCelmer Aug 19, 2025
4994c2a
📘 DOCS: Updated
FernandoCelmer Aug 19, 2025
5eec6c9
⚙️ FEATURE: Data type improvement
FernandoCelmer Aug 19, 2025
e40a74d
Merge pull request #63 from dotflow-io/feature/queue
FernandoCelmer Aug 19, 2025
a0a44a5
⚙️ FEATURE: Applied base to enable Plugins
FernandoCelmer Aug 20, 2025
21178ed
⚙️ FEATURE: Improved code documentation
FernandoCelmer Aug 20, 2025
e8be81f
❤️️ TEST: Updated unit tests
FernandoCelmer Aug 20, 2025
35d8e69
⚙️ FEATURE: Added project.entry-points configuration
FernandoCelmer Aug 20, 2025
079e3b0
⚙️ FEATURE: Applied base to enable Plugins
FernandoCelmer Aug 20, 2025
25886b5
⚙️ FEATURE: Improved plugin import
FernandoCelmer Aug 20, 2025
84c4a06
⚙️ FEATURE: Task status changed
FernandoCelmer Aug 21, 2025
1c615fb
⚙️ FEATURE: Fixed plugin import for Python 3.9
FernandoCelmer Aug 21, 2025
4273623
Merge pull request #64 from dotflow-io/feature/metrics
FernandoCelmer Aug 21, 2025
f5e29a5
📘 DOCS: Updated
FernandoCelmer Aug 21, 2025
379bdfa
⚙️ FEATURE: Task status change
FernandoCelmer Aug 21, 2025
eb8ab6e
⚙️ FEATURE: Includes task error traceback
FernandoCelmer Aug 21, 2025
8a95a28
⚙️ FEATURE: Fixed CLI
FernandoCelmer Aug 21, 2025
023b3de
⚙️ FEATURE: Removed Telegram notification
FernandoCelmer Aug 22, 2025
6dc8f7f
⚙️ FEATURE: Improved abstract class
FernandoCelmer Aug 22, 2025
a0ca219
⚙️ FEATURE: Removed MongoDB abstraction
FernandoCelmer Aug 22, 2025
e0d44f0
⚙️ FEATURE: Implementação OpenTelemetry
FernandoCelmer Aug 22, 2025
bcc1ae4
⚙️ FEATURE: Otel
FernandoCelmer Aug 22, 2025
69dae72
⚙️ FEATURE: Otel
FernandoCelmer Aug 22, 2025
050a7e0
⚙️ FEATURE: Code improvement
FernandoCelmer Aug 25, 2025
8d5d4b4
❤️ TEST: Code improvement
FernandoCelmer Aug 25, 2025
c9e4563
Merge pull request #66 from dotflow-io/feature/metrics
FernandoCelmer Aug 25, 2025
9bb27ff
⚙️ FEATURE: Deleted reference to the examples repo for refactoring
FernandoCelmer Aug 25, 2025
6554f7a
📦 PyPI: 1.0.0-dev-1
FernandoCelmer Aug 25, 2025
390882c
📦 PyPI: 1.0.0-beta-1
FernandoCelmer Aug 25, 2025
5760b33
📦 PyPI: 1.0.0.dev1
FernandoCelmer Aug 25, 2025
a9cdf16
📦 PyPI: Build
FernandoCelmer Oct 12, 2025
f73e53e
📦 PyPI: 1.0.0-dev-2
FernandoCelmer Oct 12, 2025
a40299c
📦 PyPI: 1.0.0-dev-3
FernandoCelmer Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
OTEL_SERVICE_NAME=dotflow
OTEL_METRICS_EXPORT_INTERVAL_MILLIS=5000

OTEL_EXPORTER_OTLP_ENDPOINT=0.0.0.0:4317
OTEL_EXPORTER_OTLP_INSECURE=true

OTEL_PYTHON_LOG_CORRELATION=true
OTEL_PYTHON_LOG_FORMAT=%(asctime)s - %(levelname)s [%(name)s]: %(message)s
OTEL_PYTHON_LOG_LEVEL=20
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
OTEL_PYTHON_LOGGING_SCHEDULE_DELAY_MILLIS=5000
OTEL_PYTHON_EXCLUDED_URLS=client/.*/info,healthcheck
OTEL_PYTHON_URLLIB3_EXCLUDED_URLS=client/.*/info
OTEL_PYTHON_REQUESTS_EXCLUDED_URLS=healthcheck
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ cython_debug/


# Dotflow
.output
*.output
.storage
.dotflow-io
*.json
Expand Down
2 changes: 1 addition & 1 deletion LAST_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.1
1.0.0-dev-3
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def my_task_y():

workflow = DotFlow()

workflow.task.add(step=my_task_x, callback=my_callback)
workflow.task.add(step=my_task_y, callback=my_callback)
workflow.add(step=my_task_x, callback=my_callback)
workflow.add(step=my_task_y, callback=my_callback)

workflow.start()
```
Expand Down Expand Up @@ -153,20 +153,20 @@ Now, simply add the `my_task_x` and `my_callback` functions you created earlier
- Adding one step at a time:

```python
workflow.task.add(step=my_task_x, callback=my_callback)
workflow.task.add(step=my_task_y, callback=my_callback)
workflow.add(step=my_task_x, callback=my_callback)
workflow.add(step=my_task_y, callback=my_callback)
```

- Adding multiple steps at the same time:

```python
workflow.task.add(step=[my_task_x, my_task_y], callback=my_callback)
workflow.add(step=[my_task_x, my_task_y], callback=my_callback)
```

- Adding a step with the module path:

```python
workflow.task.add(step="module.task.my_task_x", callback=my_callback)
workflow.add(step="module.task.my_task_x", callback=my_callback)
```

#### 6. Start
Expand Down Expand Up @@ -216,8 +216,8 @@ dotflow start --step examples.cli_with_mode.simple_step --mode parallel
#### Sequential

```python
workflow.task.add(step=task_foo)
workflow.task.add(step=task_bar)
workflow.add(step=task_foo)
workflow.add(step=task_bar)

workflow.start()
```
Expand All @@ -237,8 +237,8 @@ D[Finish]
#### Background

```python
workflow.task.add(step=task_foo)
workflow.task.add(step=task_bar)
workflow.add(step=task_foo)
workflow.add(step=task_bar)

workflow.start(mode="background")
```
Expand All @@ -259,10 +259,10 @@ D[Finish]
#### Parallel

```python
workflow.task.add(step=task_a)
workflow.task.add(step=task_b)
workflow.task.add(step=task_c)
workflow.task.add(step=task_d)
workflow.add(step=task_a)
workflow.add(step=task_b)
workflow.add(step=task_c)
workflow.add(step=task_d)

workflow.start(mode="parallel")
```
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
otel:
image: grafana/otel-lgtm
ports:
- 3000:3000
- 4317:4317
- 4318:4318
6 changes: 3 additions & 3 deletions docs/nav/advanced/notify-with-telegram.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import os

from dotflow import Config, DotFlow, action
from dotflow.notify import NotifyTelegram
from dotflow.types import TypeStatus
from dotflow.types import StatusTaskType
```

### Task function
Expand All @@ -69,7 +69,7 @@ Instantiate the `NotifyTelegram` class with your Telegram bot credentials. You c
notify = NotifyTelegram(
token=os.getenv("TOKEN"),
chat_id=os.getenv("CHAT_ID"),
notification_type=TypeStatus.FAILED # Notify only on failure
notification_type=StatusTaskType.FAILED # Notify only on failure
)
```

Expand All @@ -88,7 +88,7 @@ workflow = DotFlow(
Add your defined task as a step in the workflow:

```python
workflow.task.add(step=simple_task)
workflow.add(step=simple_task)
```

### Start
Expand Down
3 changes: 0 additions & 3 deletions docs/nav/reference/abc-log.md

This file was deleted.

3 changes: 3 additions & 0 deletions docs/nav/reference/abc-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Logs

::: dotflow.abc.logs.Logs
3 changes: 3 additions & 0 deletions docs/nav/reference/abc-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Metrics

::: dotflow.abc.metrics.Metrics
9 changes: 0 additions & 9 deletions docs/nav/reference/config.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/nav/reference/context-instance.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ContextInstance
# Context Instance

::: dotflow.core.context.ContextInstance
options:
Expand Down
11 changes: 11 additions & 0 deletions docs/nav/reference/dotflow-instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dotflow Instance

::: dotflow.core.dotflow.DotflowInstance
options:
members:
- _plugins
- _workflow_id
- _task
- _add
- _start

3 changes: 3 additions & 0 deletions docs/nav/reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Reference

Here's the reference or code API, the classes, functions, parameters, attributes, and all the **Dotflow** parts you can use in your applications.
3 changes: 0 additions & 3 deletions docs/nav/reference/log-default.md

This file was deleted.

3 changes: 3 additions & 0 deletions docs/nav/reference/logs-handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Logs Handler

::: dotflow.plugins.logs.LogsHandler
3 changes: 3 additions & 0 deletions docs/nav/reference/metrics-handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Metrics Handler

::: dotflow.plugins.metrics.MetricsHandler
3 changes: 0 additions & 3 deletions docs/nav/reference/notify-default.md

This file was deleted.

3 changes: 3 additions & 0 deletions docs/nav/reference/notify-handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Notify Handler

::: dotflow.plugins.notify.NotifyHandler
3 changes: 3 additions & 0 deletions docs/nav/reference/plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Plugin

::: dotflow.core.plugin.Plugin
3 changes: 3 additions & 0 deletions docs/nav/reference/storage-handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Storage Handler

::: dotflow.plugins.storage.StorageHandler
3 changes: 0 additions & 3 deletions docs/nav/reference/storage-init.md

This file was deleted.

4 changes: 3 additions & 1 deletion docs/nav/reference/task-builder.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TaskBuilder
# Task Builder

::: dotflow.core.task.TaskBuilder
options:
Expand All @@ -7,3 +7,5 @@
- count
- clear
- reverse
- schema
- result
2 changes: 1 addition & 1 deletion docs/nav/reference/task-error.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# TaskError
# Task Error

::: dotflow.core.task.TaskError
3 changes: 1 addition & 2 deletions docs/nav/reference/task-instance.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TaskInstance
# Task Instance

::: dotflow.core.task.TaskInstance
options:
Expand All @@ -13,5 +13,4 @@
- _duration
- _error
- _status
- _config
- group_name
4 changes: 2 additions & 2 deletions docs/nav/reference/type-execution.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TypeExecution
# Execution Mode Type

::: dotflow.core.types.execution.TypeExecution
::: dotflow.core.types.execution.ExecutionModeType
options:
members:
- SEQUENTIAL
Expand Down
8 changes: 4 additions & 4 deletions docs/nav/reference/type-status.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# TypeStatus
# Status Task Type

::: dotflow.core.types.status.TypeStatus
::: dotflow.core.types.status.StatusTaskType
options:
members:
- NOT_STARTED
- IN_QUEUE
- IN_PROGRESS
- COMPLETED
- SUCCESS
- PAUSED
- RETRY
- FAILED
6 changes: 3 additions & 3 deletions docs_src/backoff/backoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ def run(self):
def main():
workflow = DotFlow()

workflow.task.add(step=simple_step)
workflow.add(step=simple_step)
workflow.start()
workflow.task.clear()

workflow.task.add(step=SimpleStepX)
workflow.add(step=SimpleStepX)
workflow.start()
workflow.task.clear()

workflow.task.add(step=SimpleStepY)
workflow.add(step=SimpleStepY)
workflow.start()
workflow.task.clear()

Expand Down
10 changes: 5 additions & 5 deletions docs_src/callback/task_callback.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from dotflow import DotFlow, action, Task
from dotflow.core.types.status import TypeStatus
from dotflow.core.types.task import StatusTaskType


def callback_one(task: Task):
assert task.status is TypeStatus.COMPLETED
assert task.status is StatusTaskType.SUCCESS
print(task.task_id, task.status, task.current_context.storage)


def callback_two(task: Task):
assert task.status is TypeStatus.FAILED
assert task.status is StatusTaskType.FAILED
print(task.task_id, task.status, task.current_context.storage)


Expand All @@ -25,8 +25,8 @@ def simple_two():
def main():
workflow = DotFlow()

workflow.task.add(step=simple_one, callback=callback_one)
workflow.task.add(step=simple_two, callback=callback_two)
workflow.add(step=simple_one, callback=callback_one)
workflow.add(step=simple_two, callback=callback_two)
workflow.start(keep_going=True)

return workflow
Expand Down
6 changes: 3 additions & 3 deletions docs_src/callback/workflow_callback_failure.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from typing import List

from dotflow import DotFlow, action, Task
from dotflow.core.types.status import TypeStatus
from dotflow.core.types.task import StatusTaskType


def callback(tasks: List[Task]):
assert tasks
assert len(tasks)

for task in tasks:
assert task.status is TypeStatus.FAILED
assert task.status is StatusTaskType.FAILED
print(task.task_id, task.status, task.current_context.storage)


Expand All @@ -21,7 +21,7 @@ def simple_step():
def main():
workflow = DotFlow()

workflow.task.add(step=simple_step)
workflow.add(step=simple_step)
workflow.start(on_failure=callback)

return workflow
Expand Down
6 changes: 3 additions & 3 deletions docs_src/callback/workflow_callback_success.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from typing import List

from dotflow import DotFlow, action, Task
from dotflow.core.types.status import TypeStatus
from dotflow.core.types.task import StatusTaskType


def callback(tasks: List[Task]):
assert tasks
assert len(tasks)

for task in tasks:
assert task.status is TypeStatus.COMPLETED
assert task.status is StatusTaskType.SUCCESS
print(task.task_id, task.status, task.current_context.storage)


Expand All @@ -21,7 +21,7 @@ def simple_step():
def main():
workflow = DotFlow()

workflow.task.add(step=simple_step)
workflow.add(step=simple_step)
workflow.start(on_success=callback)

return workflow
Expand Down
28 changes: 28 additions & 0 deletions docs_src/cli/execution_mode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from os import system

from dotflow import action


@action
def simple_step():
return "ok"


def main():
"""
COMMAND:
dotflow start --step docs_src.cli.execution_mode.simple_step --mode sequential
dotflow start --step docs_src.cli.execution_mode.simple_step --mode background

OUTPUT:
0000-00-00 00:00:00,000 - INFO [dotflow]: 0: 1c88c8d5-a456-46e6-98b9-ceee3d223c88 - In queue
0000-00-00 00:00:00,000 - INFO [dotflow]: 0: 1c88c8d5-a456-46e6-98b9-ceee3d223c88 - In progress
0000-00-00 00:00:00,000 - INFO [dotflow]: 0: 1c88c8d5-a456-46e6-98b9-ceee3d223c88 - Success
"""

system("dotflow start --step docs_src.cli.execution_mode.simple_step --mode sequential")
system("dotflow start --step docs_src.cli.execution_mode.simple_step --mode background")


if __name__ == "__main__":
main()
Loading