
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
It's a Python package for building command-line terminal applications.
Don't save frequently used commands in NotePad. Don't alias a lot of complex commands. Build a Read–Eval–Print Loop (REPL) style terminal application containing pre-defined commands for easy executions from terminal.
Preview of the example application in terminal:
┌──────────────────────────────────────────────────────────────┐
│ [myapp] home │
├──────────────────────────────────────────────────────────────┤
│ │
│ 1 print hello world │
│ 2 do something │
│ 3 nested page │
│ │
├──────────────────────────────────────────────────────────────┤
│ e exit application | q quit page │
└──────────────────────────────────────────────────────────────┘
>
pip install repli
page = Page(description="home")
@page.command(type=NativeFunction, description="print hello world")
def command_print_hello_world():
print("hello world")
@page.command(type=Subprocess, description="do something")
def command_do_something():
return "echo something else"
nested_page = Page(description="nested page")
page.add_page(page=nested_page)
interpreter = Interpreter(page=page, name="myapp")
interpreter.loop()
Requirements:
Setup environment:
poetry shell
poetry install
Run example application:
poetry run example
Type check:
poetry run mypy ./example ./repli ./tests
Format:
poetry run black ./example ./repli ./tests
Lint:
poetry run flake8 ./example ./repli ./tests --config ./.flake8
Test:
poetry run pytest
Coverage:
poetry run coverage run -m pytest &&
poetry run coverage report -m
Export requirements.txt
:
poetry export --dev --without-hashes --format=requirements.txt > requirements.txt
FAQs
Read–Eval–Print Loop Interpreter
We found that repli 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
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.