
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
This module will help you paginate results from any database if you use the sqlalchemy object Query. The PageModel pydantic model can be easily integrated with FastAPI and swagger.
Here is a brief example of how to use this code.
from pygination import paginate
from pygination.models import PageModel
query = db.query(models.City)
if country_id is not None:
query = query.filter(models.City.country_id == country_id)
page = paginate(query, offset, limit)
print(page)
# Previous page does not exist. Next page is 2. Total number of pages 4
page_model = PageModel.from_orm(page)
FAQs
Simple pagination for pydantic models and SQLAlchemy Query objects
We found that pygination 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.