Skip to main content

Yoda PA

Github CI PyPI version

Personal Assistant on the command line.

Yoda

Installation

pip install yodapa

yoda --help

Configure Yoda

yoda configure

Plugins

Write your own plugin for Yoda

Simply create a class with the @yoda_plugin(name="plugin-name") decorator and add methods to it. The non-private methods will be automatically added as sub-commands to Yoda, with the command being the name you provide to the decorator.

import typer
from yodapa.plugin_manager.decorator import yoda_plugin


@yoda_plugin(name="hi")
class HiPlugin:
    """
    Hi plugin. Say hello.

    Example:
        $ yoda hi hello --name MP
        $ yoda hi hello
    """

    def hello(self, name: str = None):
        """Say hello."""
        name = name or "Padawan"
        typer.echo(f"Hello {name}!")

    def _private_method_should_not_be_added(self):
        """This method should not be added as a command."""
        raise NotImplementedError()

Development setup

# 1. Install poetry from their website: https://python-poetry.org/docs/#installation

# 2. Install dependencies and this package
poetry install

# 3. Activate the virtual environment
poetry shell

# Now you should be able to communicate with yoda
yoda --help

Testing

# Run tests when in the virtual environment
pytest

Download files

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

Source Distribution

yodapa-0.3.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yodapa-0.3.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file yodapa-0.3.0.tar.gz.

File metadata

  • Download URL: yodapa-0.3.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.20 Linux/6.8.0-1014-azure

File hashes

Hashes for yodapa-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9bf73d68dd549a18bcaf4812b9c68d36410854c844851af223b699160a4fea58
MD5 2ee7b263c74b1752d80fdcdf78c9da43
BLAKE2b-256 393000c6d7fbb8870b447ea65b7b7620a99490149538b23d12e0e97022314a30

See more details on using hashes here.

File details

Details for the file yodapa-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: yodapa-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.20 Linux/6.8.0-1014-azure

File hashes

Hashes for yodapa-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae8efae2ce44bb9277906f26160255e5344a17d249f952d3eb987ef50e25607d
MD5 98c564406773e379e0e67f0a1fd87312
BLAKE2b-256 0e78b1dc0357fe80e810bc8f2947285677324c06403fcb3f70b6226aa621f7a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page