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 python-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 Login

runit login --help
runit login --email <email@example.org> --password <supersecretpass>

or Follow the commands after running below command

runit login

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

python-runit-0.2.9.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

python_runit-0.2.9-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file python-runit-0.2.9.tar.gz.

File metadata

  • Download URL: python-runit-0.2.9.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for python-runit-0.2.9.tar.gz
Algorithm Hash digest
SHA256 a1178204863e4c3f3ccc211c08c4f9637024b727a4bd80f733c274b1f5bc2cdc
MD5 b42d2a300d859743b02a775a801d853d
BLAKE2b-256 d7fd6ffbbe8e210ef74f22082c38b5f9c59e2936fbe0f083c09d253b09c55834

See more details on using hashes here.

File details

Details for the file python_runit-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: python_runit-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for python_runit-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 4f0de5ffe03f34efc0e44f733d99c1a9d1cbf0dfada260ff71502e0838a63ec2
MD5 cac9e8521a10ead70790394c611117e1
BLAKE2b-256 3d656ebbc2af891f7d75bac1c1239576d72fc0f3c0164401942189de93bfdc89

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