Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A tiny drop-in replacement for spacy.load()
that automatically downloads a model when it is not currently installed.
pip install spacy_download
Usage is identical to spacy.load()
, meaning that you can also exclude
or disable pipeline components. Example:
from spacy_download import load_spacy
# Will download the model if it isn't installed yet
nlp = load_spacy("en_core_web_sm", exclude=["parser", "tagger"])
Under the hood, the package makes use of spaCy's capability to import models as modules, rather than using spaCy's
built-in loader. This allows us to first download a model with pip
and then load it as a module.
Note: if you are using transformer models, you still need to install spacy-transformers
yourself!
WARNING: loading models on the fly can be useful, but it is not an officially supported feature. It should work fine with the official models at the time of writing, but I cannot guarantee that this will always be the case. Use at your own risk.
FAQs
Download and load spaCy models on-the-fly.
We found that spacy-download 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.