Skip to main content

Develop serverless applications

Project description

Runit CLI Python

The Runit Command Line Interface (CLI) Tools can be used to test, manage, and deploy your Runit project from the command line.

  • Create new runit project
  • Run a local web server for your runit project
  • publish code and assets to your runit-server domain
  • Interact with data in your runit-server database

Supported Languages

Python JavaScript PHP

Installation

Python Package

You can install the Runit CLI using pip (Python package manager). Note that you will need to install Python. To download and install the runit CLI run the following command:

pip install runit

This will provide you with the globally accessible runit command.

Install from source

git clone https://github.com/theonlyamos/runit.git
cd runit
pip install .

Usage

Run the below command to print out usage message.

runit --help

Runit Cli

Create New Project Run the following in the command line to create a new runit project.

Supported languages include: Python, Javascript, PHP

runit new <project-name> --language <langugage>

Run runit new --help for all options

Run project locally Access functions on local server* Running the command runit in a project directory spins up a local webserver which can be used to access the funtions in project.

cd <project-directory>
runit

Point your browser to the address provided followed by the function name to access that function. http://localhost:5000/ will be the default address. Visiting http://localhost:5000/hello_world will run the hello_world function in the project.

Run function and print output to shell Output function result to shell. Required arguments include:

--function <function_name>: Function name to call --shell: sets shell output to true [Optional] --arguments|-x: Arguments for the function if required. Can be called multiple times for multiple arguments

cd <project-directory>
runit --function <hello_world> --shell

Publishing Project

Before you can publish any of your projects, you must setup the backend for your runit. You must also be logged in.

Setup Backend Details The backend must be running runit-server. Run runit setup --help for help message. Follow the prompts to complete the setup after running the below comman.

runit setup

Account Authentication

runit auth --help

Authenticate in browser (recommended)

runit auth

Print auth URL without opening browser

runit auth --no-open

Store token directly for CI/headless environments

runit auth --token <access-token>

Deploy/Publish Project

cd <project-directory>
runit publish

License

License

Free Software, Hell Yeah!

Project details


Download files

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

Source Distribution

runit_cli-0.4.5.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

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

runit_cli-0.4.5-py3-none-any.whl (44.6 kB view details)

Uploaded Python 3

File details

Details for the file runit_cli-0.4.5.tar.gz.

File metadata

  • Download URL: runit_cli-0.4.5.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for runit_cli-0.4.5.tar.gz
Algorithm Hash digest
SHA256 58ce70a1b3900f471f9d16e595b7721aae8b9ea70766a4f258da5aa2dd08ce2f
MD5 1240a30725694c72fa861e08626a9af5
BLAKE2b-256 91f5ad67a94d0e1f5acd2636470de8aa3d7359e9c1f8b37d6202588f47a72057

See more details on using hashes here.

File details

Details for the file runit_cli-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: runit_cli-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 44.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for runit_cli-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 47805ef9e3c89a332584fb9bbff6df9d3c4eceece917fba6a46f070bbc86c555
MD5 1a436d59e1c7e5eec8f45fd46e5e8ea9
BLAKE2b-256 675377f014e98846cb78be007bb5ef91ac155c5f7a4cfb1bac1619803e5e169c

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 Pingdom Monitoring Sentry Error logging StatusPage Status page