
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Search in list of dictionaries with lookups! Like in ORM!
Say goodbye to complicated loops and conditions when searching through lists of dictionaries!
With this simple Python tool, you can easily filter and find what you need using ORM-style lookups, making data searches
feel smooth and intuitive.
pip install list_search
You can search non-complex types like int
, string
, bool
, etc. in list
from list_search import search
lst = [1, 2, 3, 'apple', 'banana', True, False]
result = search(lst, 'apple')
Output
['apple']
Or you can search complex objects - list
or dict
. If list
- finds full match. If dict
- finds by fields
The advantage of this approach is that you can put ONLY the fields you need, NOT the whole dict!
Lookups:
__in
__contains
__contains_elements_from_list
__gt
__gte
__lt
__lte
__isnull
Up to date lookups you can find in SUPPORTED_FILTERING_LOOKUPS
from list_search import search
lst = [
{
"author": {
"name": "John",
"last_name": "Wick",
},
"books": [
"Book 1",
"Book 2"
],
"birth_year": 1950
},
{
"author": {
"name": "Jack",
"last_name": "Thompson",
},
"books": [
"Another Book 1",
"Another Book 2"
],
"birth_year": 1930
}
]
# search by the fields you need WITH LOOKUPS!
# You can put only one field, and the elements will be filtered out.
query = {
"author.name": "John",
"books__contains_elements_from_list": ["Book 2"],
"birth_year__gte": 1945
}
result = search(lst, query)
Output
{
"author": {
"name": "John",
"last_name": "Wick",
},
"books": [
"Book 1",
"Book 2"
],
"birth_year": 1950
}
FAQs
Search in list of dictionaries with lookups! Like in ORM!
We found that list-search 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.