Skip to main content

Powerful package and easy to use that simplifies the creation of pagination in your apps

Project description

pagecraft

Powerful package and easy to use that simplifies the creation of pagination in your apps

Downloads PyPI version Repo Size PyPI - License

Installing

pip install pagecraft

Tutorial

from pagecraft import PageCraft

lista_de_objetos = [
    "Automatización Eficiente con Python",
    "Explorando las Profundidades de Python",
    "Desarrollo Web Moderno con Python y Flask",
    "Introducción a la Ciencia de Datos con Python",
    "Creando Aplicaciones de Escritorio con Python y PyQt",
    "Aventuras en el Aprendizaje Automático con Python",
    "Python y la Internet de las Cosas (IoT)",
]


pgcraft = PageCraft(lista_de_objetos)

# Get first page
page = pgcraft.page(1)

when we print the page we get this

{
    "_": "Page",
    "number": 1,
    "data": [
        "Automatizaci\u00f3n Eficiente con Python",
        "Explorando las Profundidades de Python",
        "Desarrollo Web Moderno con Python y Flask",
        "Introducci\u00f3n a la Ciencia de Datos con Python",
        "Creando Aplicaciones de Escritorio con Python y PyQt"
    ],
    "next_page": 2,
    "prev_page": null,
    "is_exist": true
}

Accessing data:

# Get data from page
page.data

# True or False if next page exists
page.has_next_page

# Get the next page number
page.next_page

# True or False if prev page exists
page.has_prev_page

# Get the prev page number
page.prev_page

# Get the current page number
page.number

Extend the data returned

# set integer number as second argument
pgcraft = PageCraft(lista_de_objetos,20)

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

pagecraft-0.0.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

pagecraft-0.0.5-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pagecraft-0.0.5.tar.gz.

File metadata

  • Download URL: pagecraft-0.0.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pagecraft-0.0.5.tar.gz
Algorithm Hash digest
SHA256 4922506bd88a1483e078c2a4c4c5c263c22e807cec4db05a0ce394417b546894
MD5 d1953629d6e479d49a22bee855aff85a
BLAKE2b-256 9d80db622e822270ada94675bd8cb437c435b521fcf35ab08a0617a88311cf7b

See more details on using hashes here.

File details

Details for the file pagecraft-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pagecraft-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pagecraft-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 334ce6b7c5ebcdea67248e823ff3722f20fea8c9ce06d048cae2b3d45dc908fd
MD5 c758c558aa49d668aca6835b24792097
BLAKE2b-256 b6996cb718979b12f8f93245a979d279410d705844d7c7f3b2c0390bf36da7b6

See more details on using hashes here.

Supported by

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