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.
This is A foundamental package containing some basic self-designed functions and types for Project PyCTLib.
Package pyctlib
is the fundamental package for project PyCTLib
, a powerful toolkit for python development. This package provides basic functions for fast python v3.6+
programming. It provides easy communication with the inputs and outputs for the operating systems. It provides quick try-catch function touch
, useful types like vector
, timing tools like timethis
and scope
as long as manipulation of file path, reading & writing of text/binary files and command line tools.
This package can be installed by pip install pyctlib
or moving the source code to the directory of python libraries (the source code can be downloaded on github or PyPI).
pip install pyctlib
vector
is an improved implement of list
for python. In addition to original function for list
, it has the following advanced usage:
In [1]: from pyctlib.basictype import vector
In [2]: a = vector([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
In [3]: a.map(lambda x: x * 2)
Out[3]: [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
In [4]: a.filter(lambda x: x % 2 == 0)
Out[4]: [2, 4, 6, 8, 10]
In [5]: a.all(lambda x: x > 1)
Out[5]: False
In [6]: a.any(lambda x: x == 2)
Out[6]: True
In [7]: a[a > 7] = 7
In [8]: a
Out[8]: [1, 2, 3, 4, 5, 6, 7, 7, 7, 7]
In [9]: a.reduce(lambda x, y: x + y)
Out[9]: 49
In [10]: a.index(lambda x: x % 4 == 0)
Out[10]: 3
scope
>>> from pyctlib import scope, jump
>>> with scope("name1"):
... print("timed1")
...
timed1
[name1 takes 0.000048s]
>>> with scope("name2"), jump:
... print("timed2")
...
>>>
timethis
>>> from pyctlib import timethis
>>> @timethis
... def func(): print('timed')
...
>>> func()
timed
[func takes 0.000050s]
>>> from pyctlib import touch
>>> touch(lambda: 1/0, 'error')
'error'
>>> touch('a')
>>> a = 4
>>> touch('a')
4
@Yiteng Zhang, Yuncheng Zhou: Developers
FAQs
This is A foundamental package containing some basic self-designed functions and types for Project PyCTLib.
We found that pyctlib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.