Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 2.87 KB

README.md

File metadata and controls

63 lines (43 loc) · 2.87 KB
Pagify Logo

GitHub Stars GitHub Forks GitHub Issues Python Version MIT License Contributors GitHub Repo Size Commit Activity Downloads

Overview

Pagify is a Python package that provides a robust and flexible pagination system suitable for both simple and complex applications. Whether you need pagination for raw Python projects or integration into Django or similar frameworks, pagify delivers straightforward and adaptable solutions.

🌟 Features

  • Multiple Pagination Types:
    • Offset Pagination: Ideal for classic numbered offset and limit scenarios.
    • Cursor Pagination: Efficiently handles large datasets by using cursor-based navigation.
    • Page Number Pagination: Simple page-based pagination for easy implementation.
  • Framework-Agnostic: Can be used in any Python project, from minimal scripts to complex web frameworks.
  • Detailed Pagination Info: Includes next, previous, and current page indicators.
  • JSON Response Formatting: Consistent output formatting with built-in JSON helpers.
  • Customizable and Extensible: Easily extend with custom serializers or formatters.

📚 Documentation

For detailed guides and examples, please refer to the Complete Documentation.

🛠️ Usage

Here's a quick example of how to use pagify in your Python application:

from pagify.adapters.paginate import paginate_with_page_number

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

🤝 Contribution

We welcome contributions! If you'd like to report issues, suggest new features, or contribute code, feel free to open an issue or submit a pull request.

📄 License

pagify is licensed under the MIT License. Check the LICENSE file for more details.