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.
automodinit v0.16 5th March 2017: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Niall Douglas http://www.nedproductions.biz/ See http://pypi.python.org/pypi/automodinit for latest version Go to http://github.com/ned14/automodinit to report bugs
This package fixes a small problem which has been bugging me throughout years of python development: forgetting to keep a module's init.py up to date with new files added. This causes the following, irritating problems:
So here's how to make the problem go away forever:
all = ["I will get rewritten"]
import automodinit automodinit.automodinit(name, file, globals()) del automodinit
That's it! From now on importing a module will set all to a list of .py[co] files in the module and will also import each of those files as though you had typed:
for x in all: import x
Therefore the effect of "from M import *" matches exactly "import M".
Customising: -=-=-=-=-=-= automodinit can take the following additional parameters:
filter: This is a callable which will be passed a list of tuples (loader, modulename, ispkg) which is the output of pkgutil.iter_modules() for the calling module. Return only those which you want to be imported. importFindings: Defaults to True. Set to False to not auto-import the contents of all.
Version history: -=-=-=-=-=-=-=-=
v0.16 5th Mar 2017
v0.13 9th Feb 2013
v0.12 5th Mar 2012
v0.11 5th Mar 2012
v0.10 5th Mar 2012 First release
FAQs
Solves the problem of forgetting to keep __init__.py files up to date
We found that automodinit 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.