Skip to main content

Chamallow

...

Install

...

Local Usage Only

...

(venv)$ pip install chamallow

Distributed Usage

...

(venv)$ pip install chamallow[zmq]

Func Dispatching

...

From YAML

...

# funcs.py
def ping(a, k=None):
    return f"{a} and {k}"


def pong(a):
    print(a)

...

# demo.yml
ping:
  name: "funcs.ping"
  args:
    - "foo"
  kwargs:
    k: "bar"
  tags:
    - "foo"
pong:
  name: "funcs.pong"
  args:
    - _from: "ping"

...

(venv)$ CHAMALLOW_TAGS=foo chamallow demo.yml
foo and bar

With Decorators

...

# demo.py
from chamallow import engine, flow

@flow(tags=("foo",))
def ping(a, k=None):
    return f"{a} and {k}"


@flow()
def pong(a):
    print(a)
    return True


if __name__ == "__main__":
    engine.start()
    assert pong(ping("foo", k="bar")).result() is True
    engine.stop()

...

(venv)$ CHAMALLOW_TAGS=foo python demo.py
foo and bar

Hacking

...

CLI

...

(venv)$ chamallow

Docker

...

$ docker-compose up -d
$ docker-compose exec chamallow bash -c "chamallow examples/simple.yml"
$ docker-compose exec chamallow-client bash -c "cat simple.csv simple.json"
foo;bar
xxx;YYY
{
  "foo": "xxx",
  "bar": "YYY"
}

Settings

  • ADDRESS
  • CACHE_TTL
  • CONNECT_PORT
  • DEBUG
  • LOCAL
  • LOG_FORMAT
  • POLLING_INTERVAL
  • NUMBER_OF_CLIENTS
  • NUMBER_OF_REMOTE_CLIENTS
  • TAGS

Contributing

...

Linting

...

(venv)$ pip install chamallow[lint]
(venv)$ pre-commit run --all-files

Testing

...

(venv)$ pip install chamallow[test]
(venv)$ CHAMALLOW_LOCAL=True pytest tests/

License

MIT

Metadata

Release files for chamallow 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 chamallow 0.1.1
File Size Uploaded
chamallow-0.1.1.tar.gz 13.2 kB Details

Release files / chamallow-0.1.1.tar.gz

Download URL chamallow-0.1.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
16f87d879de853f5260c6721f04c8ac32e6de4610878b3d27b489d89779c1116
BLAKE2b-256 checksum
How to use checksums
89cc97c796d947fa2824f8e931b041a8cddbf2e275573ddcd8e5f98958fffed3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

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