{"id":34033741,"url":"https://github.com/data-centt/percentify","last_synced_at":"2026-04-09T04:31:54.522Z","repository":{"id":315810325,"uuid":"1060902815","full_name":"data-centt/percentify","owner":"data-centt","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-23T16:15:40.000Z","size":61,"stargazers_count":78,"open_issues_count":1,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-24T13:49:26.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/data-centt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-20T20:36:00.000Z","updated_at":"2026-03-23T16:15:44.000Z","dependencies_parsed_at":"2025-12-23T23:11:42.338Z","dependency_job_id":null,"html_url":"https://github.com/data-centt/percentify","commit_stats":null,"previous_names":["data-centt/percentify"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/data-centt/percentify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-centt%2Fpercentify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-centt%2Fpercentify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-centt%2Fpercentify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-centt%2Fpercentify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/data-centt","download_url":"https://codeload.github.com/data-centt/percentify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-centt%2Fpercentify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31586403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","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":[],"created_at":"2025-12-13T19:20:13.090Z","updated_at":"2026-04-09T04:31:54.515Z","avatar_url":"https://github.com/data-centt.png","language":"Python","funding_links":[],"categories":["Projects"],"sub_categories":["Data Analysis"],"readme":"#                                              % Percentify %\n[![PyPI Downloads](https://static.pepy.tech/personalized-badge/percentify?period=total\u0026units=INTERNATIONAL_SYSTEM\u0026left_color=BLACK\u0026right_color=GREEN\u0026left_text=downloads)](https://pepy.tech/projects/percentify)\n[![PyPI version](https://img.shields.io/pypi/v/percentify.svg?style=flat\u0026color=blue)](https://pypi.org/project/percentify/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/percentify.svg?style=flat\u0026color=green)](https://pypi.org/project/percentify/)\n[![License](https://img.shields.io/pypi/l/percentify.svg?style=flat\u0026color=orange)](LICENSE)\n[![Build Status](https://github.com/data-centt/percentify/actions/workflows/python-app.yml/badge.svg)](https://github.com/data-centt/percentify/actions/workflows/python-app.yml)\n\n**Percentify** is a Python helper that turns *\"part of a whole\"* into a clean percentage.  \nStop typing `(part / whole) * 100` and worrying about division by zero.\n\n---\n\n## ✨ What It Does\n\nPercentify gives you a single function:\n\n- Calculates what percentage one number is of another.\n- Handles divide-by-zero safely (returns 0.0 instead of crashing).\n- Lets you choose how many decimal places you want to round your answer to.\n- Has zero dependencies — just pure Python.\n\n## 📦 Installation\n```\npip install percentify\n```\n\n### Usage\n```\nfrom percentify import percent\n\n# Basic usage\npercent(50, 200)          # → 25.0\n\n# Handles fractions\npercent(1, 3)             # → 33.33\n\n# Safe when dividing by zero\npercent(5, 0)             # → 0.0\n\n# Custom decimals\npercent(7, 9, 4)          # → 77.7778\n```\n\n### 🛠️ How It Works\n\nThe library is intentionally simple;\n```\ndef percent(part: float, whole: float, decimals: int = 2) -\u003e float:\n    if whole == 0:\n        return 0.0\n    return round((part / whole) * 100, decimals)\n```\nThat’s it. Clean, safe, and ready to use anywhere you need percentages in your code.\n\n# 🤝 Contributing\n\nContributions are welcome!\n- If you have an idea (extra helpers, bug fixes or an idea):\n- Fork this repo\n- Create a branch\n- Commit your changes\n- Open a pull request\n\nI try to keep it tiny on purpose, to discuss big new features first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdata-centt%2Fpercentify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdata-centt%2Fpercentify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdata-centt%2Fpercentify/lists"}