Click-params: a little companion to your click project

An image showing a terminal loading a software
Photo by Jake Walker on Unsplash
Example usage of click-params type
$ cream -f passion,mint,strawberry
- passion
- mint
- strawberry
$ cream
Flavors: passion,mint
- passion
- mint
Example of click-params type instantiated with a space
$ ip -d "facebook.com google.com"
facebook.com -> 157.240.21.35
google.com -> 142.250.179.110
$ ip
Domains: facebook.com google
Error: These items are not domain names: ['google']
Domains: facebook.com google.com
facebook.com -> 157.240.21.35
google.com -> 142.250.178.142
  • Here we instantiate the parameter with a single space as argument which means that the values must be separated by a space.
  • If you look at the second usage, I deliberately added a wrong domain to show that the validation takes place.
Testing example with click-params utility functions

--

--

--

Déserteur camerounais résidant désormais en France. Passionné de programmation, sport, de cinéma et mangas. J’écris en français et en anglais dû à mes origines.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

A Beginner’s Guide to Grabbing and Analyzing Salary Data in Python

Lessons learned from forking a Helm Project

Static and Dynamic Libraries: Their Uses and Differences

Build Cloud Infrastructure Network Dependency Based on Graph Database

Stop actually view by decide.

5 Minutes : Let’s dive into server-side Kotlin!

A Tool to get latet image version of application from ECR

Alt Text

Search through Various File Types with Apache Tika

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kevin Tewouda

Kevin Tewouda

Déserteur camerounais résidant désormais en France. Passionné de programmation, sport, de cinéma et mangas. J’écris en français et en anglais dû à mes origines.

More from Medium

HelloWordl in CircleCI

How to Build a Raspberry Pi Door Monitor

Philips Hue with python

Python philips hue

Top Django Development Companies In The UK