Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Click support for Python's datetime
types to allow developers to easy parse
date strings as parameters to Python click CLIs.
You can accept a datetime as a parameter to your click CLI
from datetime import datetime
import click
from click_datetime import Datetime
@click.option(
"--date",
type=Datetime(format="%Y-%m-%d"),
default=datetime.now(),
help="An example parsing and printing a datetime.",
)
@click.command()
def cli(date: datetime):
click.echo("The date : {0}".format(date))
if __name__ == "__main__":
cli() # type: ignore
$ python main.py --date=2016-01-01
pip install click-datetime
poetry build
# Create a virtual environment for testing
python -m .venv/test
source .venv/test/bin/activate
# Confirm importing and exporting is correct
python -c 'import click_datetime as cd; print(dir(cd))'
FAQs
Datetime type support for click.
We found that click-datetime 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.