Skip to main content

Your faithful companion

Project description

🤖 Zrb: Your Faithful Companion

Zrb is a CLI-based automation tool and low-code platform. Once installed, you can automate day-to-day tasks, generate projects and applications, and even deploy your applications to Kubernetes with a few commands.

To use Zrb, you need to be familiar with CLI.

Let's see how you can build a CRUD application, add some fields to it, and deploy the application as monolith/microservices:

# Create a project
zrb project create --project-dir my-project --project-name "My Project"
cd my-project

# Create a Fastapp
zrb project add fastapp --project-dir . --app-name "fastapp" --http-port 3000

# Add library module to fastapp
zrb project add fastapp-module --project-dir . --app-name "fastapp" --module-name "library"

# Add entity named "books"
zrb project add fastapp-crud --project-dir . --app-name "fastapp" --module-name "library" \
    --entity-name "book" --plural-entity-name "books" --column-name "code"

# Add column to the entity
zrb project add fastapp-field --project-dir . --app-name "fastapp" --module-name "library" \
    --entity-name "book" --column-name "title" --column-type "str"

# Run Fastapp as monolith
zrb project start-fastapp --fastapp-run-mode "monolith"

# Run Fastapp as microservices
zrb project start-fastapp --fastapp-run-mode "microservices"

# Run Fastapp as container
zrb project start-fastapp-container --fastapp-run-mode "microservices"
zrb project stop-fastapp-container

# Deploy fastapp and all it's dependencies to kubernetes
docker login
zrb project deploy-fastapp --fastapp-deploy-mode "microservices"

You can visit our tutorials to see more cool tricks.

Lastly, Zrb also allows you to define your automation commands in Python:

# filename: zrb_init.py
from zrb import runner, CmdTask, StrInput

hello = CmdTask(
    name='hello',
    inputs=[StrInput(name='name', description='Name', default='world')],
    cmd='echo Hello {{input.name}}'
)
runner.register(hello)

Once defined, your command will be instantly available from the CLI:

zrb hello
Name [world]: Go Frendi
🤖 ➜  2023-06-10T21:20:19.850063 ⚙ 10008 ➤ 1 of 3 • 🐷            zrb hello • Run script: echo Hello Go Frendi
🤖 ➜  2023-06-10T21:20:19.850362 ⚙ 10008 ➤ 1 of 3 • 🐷            zrb hello • Current working directory: /home/gofrendi/zrb/playground
🤖 ➜  2023-06-10T21:20:19.857585 ⚙ 10009 ➤ 1 of 3 • 🐷            zrb hello • Hello Go Frendi
Support zrb growth and development!
☕ Donate at: https://stalchmst.com/donation
🐙 Submit issues/pull requests at: https://github.com/state-alchemists/zrb
🐤 Follow us at: https://twitter.com/zarubastalchmst
🤖 ➜  2023-06-10T21:20:19.898304 ⚙ 10009 ➤ 1 of 3 • 🐷            zrb hello • zrb hello completed in 0.11999917030334473 seconds
To run again: zrb hello --name "Go Frendi"
Hello Go Frendi

To learn more about this, you can visit our getting started guide.

🫰 Installation

Installing Zrb in your system is as easy as typing the following command in your terminal:

pip install zrb

Just like any other Python package, you can also install Zrb in your virtual environment. This will allow you to have many versions of Zrb on the same computer.

⚠️ If the command doesn't work, you probably don't have Pip/Python on your computer. See Main prerequisites subsection to install them.

✅ Main prerequisites

Since Zrb is written in Python, you need to install a few things before installing Zrb:

  • 🐍 Python
  • 📦 Pip
  • 🏝️ Venv

If you are using 🐧 Ubuntu, the following command should work:

sudo apt-get install python3 python3-pip python3-venv python-is-python3

If you are using 🍎 Mac, the following command will work:

# Make sure you have homebrew installed, see: https://brew.sh/
brew install python3
ln -s venv/bin/pip3 /usr/local/bin/pip
ln -s venv/bin/python3 /usr/local/bin/python

If you prefer Python distribution like conda, that might work as well.

✔️ Other prerequisites

If you want to generate applications using Zrb and run them on your computer, you will also need:

  • 🐸 Node.Js and Npm.
    • You need Node.Js to modify/transpile frontend code into static files.
    • You can visit Node.Js website for installation instructions.
  • 🐋 Docker and Docker-compose plugin.
    • You need Docker and Docker-compose plugin to
      • Run Docker-compose based tasks
      • Run some application prerequisites like RabbitMQ, Postgre, or Redpanda.
    • The easiest way to install Docker, Docker-compose plugin, and local Kubernetes is by using Docker Desktop.
    • You can also install Docker and Docker-compose plugin by following Docker installation guide.
  • ☸️ Kubernetes cluster.
    • Zrb allows you to deploy your applications into Kubernetes.
    • To test it locally, you will need a Minikube or other alternatives. However, the easiest way is by enabling Kubernetes on your Docker Desktop.
  • 🦆 Pulumi
    • You need Pulumi to deploy your applications

🏁 Getting started

We have a nice getting started guide to help you cover the basics. Make sure to check it out😉.

📖 Documentation

You can visit Zrb documentation for more detail information.

☕ Donation

Help Red Skull to click the donation button:

🎉 Fun fact

Madou Ring Zaruba (魔導輪ザルバ, Madōrin Zaruba) is a Madougu which supports bearers of the Garo Armor. (Garo Wiki | Fandom)

Madou Ring Zaruba on Kouga's Hand

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zrb-0.0.66.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

zrb-0.0.66-py3-none-any.whl (778.4 kB view details)

Uploaded Python 3

File details

Details for the file zrb-0.0.66.tar.gz.

File metadata

  • Download URL: zrb-0.0.66.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for zrb-0.0.66.tar.gz
Algorithm Hash digest
SHA256 01dfbe25fd54af00710fcb430eb32efe91750401e3388d9310c74824dde881ad
MD5 a39e7e7078a934dce006ed94c094c57c
BLAKE2b-256 a157fa5942057b2885ad36a07eb51737e809f6d77806a27a6e247d790cd67aeb

See more details on using hashes here.

File details

Details for the file zrb-0.0.66-py3-none-any.whl.

File metadata

  • Download URL: zrb-0.0.66-py3-none-any.whl
  • Upload date:
  • Size: 778.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for zrb-0.0.66-py3-none-any.whl
Algorithm Hash digest
SHA256 5850da41c2d4827de47024717e8ac4b87a50fe78df3df15b849af7f92299494c
MD5 4ab07ab8bab90cc8f773c8032518f4ce
BLAKE2b-256 86397d34c5614b1e445f58b32431d2fa73d802830b937cc1ee9334f567ad764a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page