Yoda PA
Personal Assistant on the command line.
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.1.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yodapa-0.3.1.tar.gz.
File metadata
- Download URL: yodapa-0.3.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2a3ecce31f51ce68255ac006ffe82dee2ee940c0dcedec53ef7c83b26b03fe3
|
|
| MD5 |
8e84c1eca307caed9bf9a6de55688e3a
|
|
| BLAKE2b-256 |
a0b85b2da175abce3088b0ed2ed7b28bd3a9da40b2e7fdacd2da8443cf8db2e5
|
File details
Details for the file yodapa-0.3.1-py3-none-any.whl.
File metadata
- Download URL: yodapa-0.3.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bddbce1e5a8e205c71ec4d73f1042a5b76913caf03da3f308d980dc63e85484a
|
|
| MD5 |
7645484934f207c9ca747d3977a8565b
|
|
| BLAKE2b-256 |
71d9f12a5523a4ca1c39ef01e5c4c5b4de608fcd9490d0a413add83799922856
|