https://github.com/wanshot/rapidfire
RapidFire is calls and displays the defined Python function from command line
https://github.com/wanshot/rapidfire
python3 shell
Last synced: 2 months ago
JSON representation
RapidFire is calls and displays the defined Python function from command line
- Host: GitHub
- URL: https://github.com/wanshot/rapidfire
- Owner: wanshot
- License: mit
- Created: 2017-01-27T13:44:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-09T17:09:26.000Z (about 9 years ago)
- Last Synced: 2025-09-29T10:02:15.611Z (9 months ago)
- Topics: python3, shell
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- Changelog: ChangeLog.rst
- License: LICENSE
Awesome Lists containing this project
README
RapidFire
=================
.. image:: https://img.shields.io/pypi/v/rapidfire.svg
:target: https://pypi.python.org/pypi/rapidfire
.. image:: https://img.shields.io/pypi/l/rapidfire.svg
:target: https://pypi.python.org/pypi/rapidfire
.. image:: https://img.shields.io/pypi/wheel/rapidfire.svg
:target: https://pypi.python.org/pypi/rapidfire
.. image:: https://img.shields.io/pypi/pyversions/rapidfire.svg
:target: https://pypi.python.org/pypi/rapidfire
.. image:: https://circleci.com/gh/wanshot/RapidFire/tree/master.svg?style=svg
:target: https://circleci.com/gh/wanshot/RapidFire/tree/master
SETUP
----------
- Init RapidFire
.. code-block:: shell
$ pip install rapidfire
$ rap --init
$ vi /Your/home/directory/.rapidfire.d/raprc
- Set the value in RAPIDFIRE_PYFILE_PATH
::
RAPIDFIRE_PYFILE_PATH = /path/hoge.py
- Edit sample code
.. code-block:: shell
$ vi /path/hoge.py
.. code-block:: py
from rapidfire import task
@task
def sample():
return ['text1', 'text2', 'text3']
- Run RapidFire
.. code-block:: shell
$ rap sample
API
--------------------------
- rapidfire.task(next_action, clipboard, per_page)
- Parameters
- next_action - For next_action, specify the function name to be executed next
- clipboard - Copy the result to the cripboard
- per_page - Lines per page
Example
--------------------------
.. code-block:: py
from rapidfire import task
### Case.1
@task(next_action='sample_method2', per_page=2)
def sample_method1():
return ['text1', 'text2', 'text3']
@task(clipboard=True)
def sample_method2():
selected_value = sample_method1 # The value selected by sample_method1 is entered
return ['{} is selected'.format(selected_value)]
.. code-block:: shell
$ rap sample_method1