{"id":33930661,"url":"https://github.com/daniel-samson/paginate","last_synced_at":"2026-04-06T07:01:38.418Z","repository":{"id":42190687,"uuid":"247609667","full_name":"daniel-samson/paginate","owner":"daniel-samson","description":"🦀 A framework agnostic pagination crate that is especially suited for databases, slices and collections.","archived":false,"fork":false,"pushed_at":"2024-01-23T19:53:37.000Z","size":82,"stargazers_count":17,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T21:46:24.745Z","etag":null,"topics":["crate","pagination","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/paginate","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daniel-samson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-16T04:21:12.000Z","updated_at":"2025-03-07T04:43:06.000Z","dependencies_parsed_at":"2022-08-12T09:00:38.612Z","dependency_job_id":null,"html_url":"https://github.com/daniel-samson/paginate","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/daniel-samson/paginate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-samson%2Fpaginate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-samson%2Fpaginate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-samson%2Fpaginate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-samson%2Fpaginate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniel-samson","download_url":"https://codeload.github.com/daniel-samson/paginate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-samson%2Fpaginate/sbom","scorecard":{"id":319258,"data":{"date":"2025-08-11","repo":{"name":"github.com/daniel-samson/paginate","commit":"e32e81f55eca8b72368b07df85fbe7408e9b967a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/daniel-samson/paginate/publish.yml/main?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T00:58:38.304Z","repository_id":42190687,"created_at":"2025-08-18T00:58:38.304Z","updated_at":"2025-08-18T00:58:38.304Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31463015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crate","pagination","rust"],"created_at":"2025-12-12T12:04:09.834Z","updated_at":"2026-04-06T07:01:38.403Z","avatar_url":"https://github.com/daniel-samson.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"A framework agnostic pagination crate, that is especially suited for databases, slices and collections. Paginate calculates the range of page indexes, making it ideal for accessing slices, chunking data and querying databases.\n\n\n## Project Status\n\n[![crates.io](https://img.shields.io/crates/v/paginate.svg)](https://crates.io/crates/paginate)\n[![CI](https://github.com/daniel-samson/paginate/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/daniel-samson/paginate/actions/workflows/ci.yml)\n[![CodeFactor](https://www.codefactor.io/repository/github/daniel-samson/paginate/badge)](https://www.codefactor.io/repository/github/daniel-samson/paginate)\n[![codecov](https://codecov.io/gh/daniel-samson/paginate/branch/main/graph/badge.svg)](https://codecov.io/gh/daniel-samson/paginate)\n[![book](https://img.shields.io/badge/Book-Latest-blue)](https://daniel-samson.github.io/paginate-docs/)\n[![stars - paginate](https://img.shields.io/github/stars/daniel-samson/paginate?style=social)](https://github.com/daniel-samson/paginate)\n[![forks - paginate](https://img.shields.io/github/forks/daniel-samson/paginate?style=social)](https://github.com/daniel-samson/paginate)\n\n## Installation\nAdd the following line to your Cargo.toml file:\n\n```toml\npaginate = \"^1\"\n```\n\n## Examples\n\n\nTo iterate over each page:\n\n```rust\nuse paginate::Pages;\n\nfn main() {\n    let total_items = 100;\n    let items_per_page = 5;\n    let pages = Pages::new(total_items, items_per_page);\n    println!(\"total pages: {}\", pages.page_count());\n    for page in pages.into_iter() {\n        println!(\"offset: {}, total: {}, start: {}, end: {}\", page.offset, page.length, page.start, page.end);\n    }\n}\n```\n\nTo get the pagination of a specific offset:\n```rust\nuse paginate::Pages;\n\nfn main() {\n    let total_items = 35;\n    let items_per_page = 5;\n    let pages = Pages::new(total_items, items_per_page);\n    let page = pages.with_offset(3);\n    println!(\"total pages: {}\", pages.page_count());\n    println!(\"offset: {}, total: {}, start: {}, end: {}\", page.offset, page.length, page.start, page.end);\n}\n```\n\n## Getting help\n\n- [API Documentation](https://docs.rs/paginate/latest/paginate/)\n- [Book](https://daniel-samson.github.io/paginate-docs/)\n\n\n## Contribute\n\n- Star this project. It really helps!\n- [Ask a question](https://github.com/daniel-samson/paginate/issues/new?assignees=\u0026labels=question\u0026template=question.md\u0026title=Question%3A+)\n- [Report a bug](https://github.com/daniel-samson/paginate/issues/new?assignees=\u0026labels=bug\u0026template=bug_report.md\u0026title=Bug+Report%3A+)\n- [Request documentation](https://github.com/daniel-samson/paginate/issues/new?assignees=\u0026labels=documentation\u0026template=documentation.md\u0026title=Needs+Documentation%3A+)\n- [Request a new feature](https://github.com/daniel-samson/paginate/issues/new?assignees=\u0026labels=enhancement\u0026template=feature_request.md\u0026title=)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-samson%2Fpaginate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel-samson%2Fpaginate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-samson%2Fpaginate/lists"}