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.
iters
Composable external iteration.
If you have found yourself with a collection of some kind, and needed to perform an operation on the elements of said collection, you will quickly run into iterators. Iterators are heavily used in idiomatic Python code, so becoming familiar with them is essential.
Python 3.8 or above is required.
Installing the library with pip
is quite simple:
$ pip install iters
Alternatively, the library can be installed from source:
$ git clone https://github.com/nekitdev/iters.git
$ cd iters
$ python -m pip install .
You can add iters
as a dependency with the following command:
$ poetry add iters
Or by directly specifying it in the configuration like so:
[tool.poetry.dependencies]
iters = "^0.18.0"
Alternatively, you can add it directly from the source:
[tool.poetry.dependencies.iters]
git = "https://github.com/nekitdev/iters.git"
Squaring only even numbers in some sequence:
from iters import iter
def is_even(value: int) -> bool:
return not value % 2
def square(value: int) -> int:
return value * value
numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
result = iter(numbers).filter(is_even).map(square).list()
print(result) # [0, 4, 16, 36, 64]
Asynchronous iteration is fully supported by iters
, and its API is similar to its
synchronous counterpart.
You can find the documentation here.
If you need support with the library, you can send an email or refer to the official Discord server.
You can find the changelog here.
You can find the Security Policy of iters
here.
If you are interested in contributing to iters
, make sure to take a look at the
Contributing Guide, as well as the Code of Conduct.
iters
is licensed under the MIT License terms. See License for details.
FAQs
Composable external iteration.
We found that iters 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.