Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Easy pagination for Pyramid applications! It currently has built-in support for paginating:
But can support pagination over any data type via extensions.
Install with:
.. code-block:: bash
$ pip install pyramid_pagination
Use default pagination with:
.. code-block:: python
from pyramid_pagination import paginate
@paginate def view(request): return range(30)
Then a request without parameters results in:
.. code-block:: json
{ "result": [0, 1, 2, ... , 22, 23, 24], "page": { "offset": 0, "limit": 25, "count": 30, "attribute": "result" } }
Paginating with some defaults changed and adding some attribute-based sort methods:
.. code-block:: python
from pyramid_pagination import paginate
@paginate(limit_default=2, comparers=['name', 'value']) def view(request): return [ dict(name='alph', value=1), dict(name='beta', value=2), dict(name='zeta', value=3), dict(name='alph', value=4), ]
Then a request with parameters
?page.offset=1&page.limit=3&page.sort=name-,value
results in:
.. code-block:: json
{ "result": [ {"name": "beta", "value": 2}, {"name": "alph", "value": 1}, {"name": "alph", "value": 4} ], "page": { "offset": 1, "limit": 3, "count": 4, "sort": "name-,value", "attribute": "result" } }
FAQs
Easy pagination for Pyramid applications
We found that pyramid_pagination 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.