Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
This library is aimed to provide useful features and helpers in order to shorten the number of required lines of code for writing simple and nice-looking command-line interface tools. It is based on argparse
and is considered a development kit, on the contrary of popular frameworks like cement
, click
or docopt
, as it is not aimed to reinvent the wheel in yet another paradigm.
pip install tinyscript
This library is built with the DRY (Don't Repeat Yourself) and KISS (Keep It Stupid Simple) philosophies in mind ; the whole machinery of Tinyscript holds in its star import (from tinyscript import *
) and its initialization (with the initialize
function).
It is aimed to shorten required code by setting a few things while loaded:
ArgumentParser
(and define its epilog, and so forth)Leveraging this allows to create very short scripts with only the real code that matters, reducing the code to be rewritten to create efficient, nice-looking and sophisticated CLI tools.
Note that, while star imports should be avoided according to Python's style guide (see PEP8), it is deliberately extensively used and covering a huge scope in order to shorten code length. This "anti-pattern" pays off after creating a few tools, when we can realize it shortens parts of the code that are often repeated from a tool to another (e.g. for shaping tool's help message).
It is designed to be as simple and straightforward to use as possible. In order to learn and use it, you only need your browser (for consulting the documentation), a text editor and a good Python Interpreter (e.g. IDLE) for using auto-completion or an IDE like PyCharm to get helpers suggested.
The point is that you will use:
ìnitialize
ts
Please see the example tools herebelow for examples of usage of features, helpers and reporting.
FAQs
Devkit for quickly building CLI tools with Python
We found that tinyscript demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.