Skip to content

hpymountain/vortex_solutions

Repository files navigation

tokeo-social


tokeo

Unleashing the Power of Python, Cement, Dramatiq, Apschedule and Grpc for Superior EDA Solutions!

-- Event-Driven Architecture, Backend-Automation, Event-Driven Automation --



In an an Event-Driven Architecture (EDA) world you need a fast and reliable development cycle even for small projects.

Cement is a well known python project and allows to build fast and super documented CLI apps with easyness.

The Dramatiq background task processing library in combination with RabbitMQ Message Broker runs a reliable and solid EDA environment.

An integrated Grpc service gives access to the available tasks and workflows from outside.

For timed jobs excution there is an integrated interactive Apscheduler cron service.

Kickstart your EDA projects with tokeo and experience a seamless development cycle.

Cheers
Tom


tokeo CLI handles all the workers, services, tasks, jobs and functions


Installation on production

$ make virtualenv

$ source .venv/bin/activate

$ python setup.py develop # currently install will cause an error on lazy-load

Run the message broker workers

$ source .venv/bin/activate

### run the dramatiq workers for the implemented tasks

$ tokeo dramatiq serve

Run a task by emitter

$ source .venv/bin/activate

### run the count_words task

$ tokeo emit count-words --url https://github.com

### check result output on dramatiq serve console

Run the grpc service

$ source .venv/bin/activate

### run the grpc service for the exported methods

$ tokeo grpc serve

Run a task by grpc call

$ source .venv/bin/activate

### run the count_words task

$ tokeo grpc-client count-words --url https://github.com

### check result output on dramatiq serve console

Run tasks by scheduler

$ source .venv/bin/activate

### run the scheduler

$ tokeo scheduler launch

### now you are in the interactive scheduler shell

Scheduler> list

### will print the active running tasks and their next execution time

### check result output on dramatiq serve console

Controlling log level

The log level for the app can be set by config file (config/tokeo.yaml) or an environment variable.

### this enables the app debug level output
$ TOKEO_LOG_COLORLOG_LEVEL=debug tokeo command

### Instead this enables also the framework debug log
$ tokeo --debug command

### At least this enables framework debug log only
$ CEMENT_LOG=1 tokeo command

Development

This project includes a number of helpers in the Makefile to streamline common development tasks.


Environment Setup

The following demonstrates setting up and working with a development environment:

### create a virtualenv for development

$ make virtualenv

$ source .venv/bin/activate

$ pip install -r requirements-dev.txt

$ python setup.py develop


### check tokeo cli application

$ tokeo --help


### run pytest / coverage

$ make test

Releasing to PyPi

Before releasing to PyPi, you must configure your login credentials:

~/.pypirc:

[pypi]
username = YOUR_USERNAME
password = YOUR_PASSWORD

Then use the included helper function via the Makefile:

$ make dist

$ make dist-upload

Deployments


Docker

Included is a basic Dockerfile for building and distributing The tokeo, and can be built with the included make helper:

$ make docker

$ docker run -it tokeo --help

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •