Skip to main content

A lightweight and flexible pagination package for Python applications.

Project description

Pagify

Welcome to the Pagify documentation! This package provides an easy-to-use solution for handling pagination in Python applications, supporting a wide range of projects from basic scripts to complex frameworks.


Introduction

The Pagify package is a versatile and efficient tool for implementing pagination in Python applications. It supports multiple pagination types to cater to different needs, making it suitable for use with plain Python, Django, Flask, or any other Python-based frameworks.

Key Features

  • Framework-Agnostic: Compatible with raw Python applications, Django projects, and more.
  • Multiple Pagination Methods: Supports offset, cursor, and page number pagination for diverse use cases.
  • Detailed Metadata: Provides comprehensive pagination details such as next, previous, and current pages.
  • Easy-to-Use: Straightforward API for rapid integration.
  • Customizable: Easily extendable for advanced use cases.

Installation

To install the Pagify package, run the following command:

Install the Pagify Package

Install Pagify from PyPI using pip:

pip install pagify

Usage

For complete guides, detailed examples, and advanced use cases, refer to the usage documentation. This section covers everything from basic usage to customization for different pagination strategies.

Quick Start

Here's a brief overview to get you started quickly:

  1. Import and Setup: Import the appropriate pagination method from pagify.adapters.
  2. Apply Pagination: Use the method on your dataset or query results.
  3. Format Responses: Utilize the provided functions for standardized JSON response formatting.

Example:

from pagify.adapters.paginate import paginate_with_page_number

data = [{'id': i} for i in range(1, 101)]  # Sample dataset
result = paginate_with_page_number(data, page=2, page_size=10)
print(result)

API Reference

For a detailed breakdown of classes, methods, and available parameters, please refer to the API reference. This will guide you through the full potential of Pagify and provide insights into all features.

Quick Links

  • Pagination Adapters: Overview of adapters for various pagination types.
  • Helper Functions: Details of utility functions for formatting responses.
  • Error Handling: Learn how to manage common issues when implementing pagination.

Contributing

We welcome contributions to Pagify! If you'd like to contribute, follow these steps:

  1. Fork the Repository: Create a copy of the project on your GitHub account.
  2. Make Changes: Implement your improvements or new features.
  3. Submit a Pull Request: Share your work with the community.

For detailed contribution guidelines, see the CONTRIBUTING.md file in the repository.


License

This project is licensed under the MIT License. For more information, see the LICENSE file. This permits free use, modification, and distribution while maintaining the package's open-source nature.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pagify-1.0.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pagify-1.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pagify-1.0.1.tar.gz.

File metadata

  • Download URL: pagify-1.0.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for pagify-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ef4084c94f4d85530fb0ba079c24d737e5da3da4e2f78a844b41ee85ded34f27
MD5 a22f809fbd4703e7e69e66a5a474f668
BLAKE2b-256 32ebcfa8b275f433301e6d625f48d55d2eaa19c7f25f08e62855695ef0f7b4dc

See more details on using hashes here.

File details

Details for the file pagify-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pagify-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for pagify-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d4274de86349eb1589b7e2cf100e97e4b467b8281a707ad9817abdec0fb5c0d
MD5 60bc41860beb9a33ed391a598096936a
BLAKE2b-256 f73af33ccaff6e0ba8f3d9c5b3e8f15b7bd7677bd3791ac3cac9d873d3ff5872

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page