Skip to main content

Apex Logo

Apex

Motor de workflows em Python — DAG, @flow, @task, state implícito

Python Version License Tests Dependencies


O que é

Apex é um framework Python zero-dependências para construir workflows, automações e agentes. Transforma funções Python comuns em grafos acíclicos dirigidos (DAGs) analisando o código-fonte em tempo real.

from apex.graph import flow, state

@flow
def meu_workflow():
    etapa1()
    etapa2()

meu_workflow.run(state={"chave": "valor"})

Quick Start

pip install apex-taskflow
from apex.graph import flow, task, state

@task(retry=2)
def buscar_dados():
    state.dados = {"valor": 42}

@task(timeout=10)
def processar():
    state.resultado = state.dados["valor"] * 2

@flow
def pipeline():
    buscar_dados()
    processar()

resultado = pipeline.run()
print(resultado.resultado)  # 84

Filosofia

  • Zero configuração — decorators e funções padrão
  • Implícito por design — state global por execução sem injeção manual
  • Tudo é uma task — toda chamada de função vira nó no DAG
  • Paralelismo automático — tasks independentes rodam em paralelo
  • Visualização nativa — ASCII, SVG, Mermaid, HTML, PNG

Estrutura

apex/
├── __init__.py          # from apex.graph import flow, task, state
├── __version__.py       # 0.1.0
└── graph/
    ├── _state.py        # State + _StateProxy + contextvars
    ├── _dag.py          # AST walker → DAG + cycle detection
    ├── _scheduler.py    # Flow, @flow, @task, executor, retry, timeout
    └── _viz.py          # ASCII, SVG, Mermaid, HTML, PNG

Documentação

Seção Conteúdo
graph — motor de workflows @flow, @task, state, scheduler, DAG
Exemplos completos Pipeline, e-commerce, ReAct, padrões

Licença

MIT — veja LICENSE.

Metadata

Release files for apex-taskflow 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apex-taskflow 0.1.1
File Size Uploaded Provenance Actions
apex_taskflow-0.1.1.tar.gz 20.3 kB Without provenance Details for apex_taskflow-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apex-taskflow 0.1.1
File Interpreter ABI Platform Actions
apex_taskflow-0.1.1-py3-none-any.whl Python 3 none any Details for apex_taskflow-0.1.1-py3-none-any.whl

Total release size: 35.4 kB

Release files / apex_taskflow-0.1.1.tar.gz

Download URL apex_taskflow-0.1.1.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
367442db1e7b5fe8604b8200188b9f848a9b7a05f785ecf84acb4fdfdc741a93
BLAKE2b-256 checksum
How to use checksums
d8ca622dca0f7a7b7fcf19530f09f0a9bdae3c67abaca23ab2eeb0850d1b36e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / apex_taskflow-0.1.1-py3-none-any.whl

Download URL apex_taskflow-0.1.1-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ac4b0d1fa89b41c94b40501a03d411851fa545bcf89ec69107eea0efcd207a6
BLAKE2b-256 checksum
How to use checksums
93a13e6435f42b42082ff6d0f42c8ef0f1f5dbbfb223c7540da68abe2392aa21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for apex-taskflow 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page