{"id":34096233,"url":"https://github.com/recite/pip-fund","last_synced_at":"2025-12-14T15:30:57.695Z","repository":{"id":305247024,"uuid":"1022320464","full_name":"recite/pip-fund","owner":"recite","description":"A poor man's npm fund for Python","archived":false,"fork":false,"pushed_at":"2025-11-22T22:58:43.000Z","size":99,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T00:19:19.658Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/recite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-07-18T20:55:28.000Z","updated_at":"2025-11-22T22:58:46.000Z","dependencies_parsed_at":"2025-07-26T23:11:16.441Z","dependency_job_id":"b252dea9-152c-4e21-bb4c-5c6bb78b30a8","html_url":"https://github.com/recite/pip-fund","commit_stats":null,"previous_names":["gojiplus/pip-fund","gojiplus/pypifund","recite/pip-fund"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/recite/pip-fund","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recite%2Fpip-fund","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recite%2Fpip-fund/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recite%2Fpip-fund/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recite%2Fpip-fund/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/recite","download_url":"https://codeload.github.com/recite/pip-fund/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recite%2Fpip-fund/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27730507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"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-14T15:30:55.074Z","updated_at":"2025-12-14T15:30:57.688Z","avatar_url":"https://github.com/recite.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pip‑fund\n\npip‑fund is a small command‑line tool that scans your Python environment (or a list of package names) and reports any funding or sponsorship links it can find. It is inspired by Node.js's `npm fund` command and uses Python's packaging metadata to discover funding information. The goal is to make it easy for developers to discover how to support the open‑source libraries they depend on.\n\n## Features\n\n**Normalizes labels and URLs**: Funding links are detected by examining Project‑URL metadata and matching normalized labels against a set of known aliases such as funding, sponsor, donate and donation. Labels containing the words fund or sponsor are also matched. Query strings and fragments are stripped from URLs before grouping, so links that differ only by tracking parameters are treated as the same.\n\n**Groups duplicate links**: When multiple packages share the same funding URL, the tool groups them into a single entry and lists all associated package names.\n\n**Multiple output formats**: Choose human‑readable text (default), JSON (`--json`) or Markdown (`--markdown`).\n\n**Remote lookups**: Use the `--remote` flag to query the PyPI JSON API for funding links of packages that are not installed locally.\n\n**Optional GitHub sponsor support**: When installed with the github extra (`pip install pip‑fund[github]`), the tool can attempt to fetch sponsor links from a repository's `.github/FUNDING.yml` file on GitHub if no funding metadata is present. This requires a GitHub access token.\n\n## Installation\n\n### Basic usage\n\n```bash\npip install pip-fund\n\n# Scan all installed packages for funding information\npip-fund\n\n# Check specific packages (installed or not) and query PyPI if needed\npip-fund --remote requests flask\n\n# Output Markdown instead of plain text\npip-fund --markdown\n```\n\n### Enabling GitHub sponsor integration\n\nTo enable GitHub sponsor discovery, install the github extra and provide a GitHub personal access token via the `GITHUB_TOKEN` environment variable. Without a token the GitHub API will operate with very limited rate limits.\n\n```bash\npip install pip-fund[github]\n\nexport GITHUB_TOKEN=ghp_yourtokenhere\npip-fund --github flask\n```\n\n## Usage\n\nRunning `pip-fund` without arguments scans all installed distributions in the current Python environment. For each unique funding link found, it prints the label, the URL and the names of packages that declare it. If no funding information is discovered, the tool explains why this might be the case.\n\nUse the `--json` or `--markdown` flags to produce machine‑readable output. Combine `--remote` with package names to query funding information for packages that aren't installed.\n\n## Project structure\n\nThis project follows the modern Python packaging guidelines:\n\nA `pyproject.toml` file declares the build system (setuptools) and metadata such as the project name, version and console script entry point. The `[project.scripts]` table instructs the build backend to generate a `pip-fund` command that invokes the `main()` function in `pip_fund/fund.py` [packaging.python.org](https://packaging.python.org).\n\nSource code lives in the `src/pip_fund/` package. The main module `fund.py` implements the logic of detecting funding links.\n\nOptional dependencies for GitHub sponsor support are defined under `[project.optional-dependencies]` in `pyproject.toml`. Installing with `pip install pip-fund[github]` adds the PyGithub and PyYAML libraries.\n\n## Contributing\n\nContributions are welcome! Feature requests, bug reports and pull requests are greatly appreciated. Areas of interest include:\n\n- Improving detection of funding links in package metadata\n- Supporting additional donation platforms\n- Enhancing the GitHub sponsor integration\n- Adding interactive prompts or browser integration to open funding pages directly from the CLI\n\n## License\n\nThis project is released under the MIT License.\n\n---\n\n## Implementation Details\n\n**fund.py** contains the complete implementation. It normalizes labels and URLs, groups identical funding links across packages, supports JSON/Markdown output, queries PyPI for remote packages, and optionally fetches sponsor links from GitHub's `.github/FUNDING.yml` when the github extra is installed.\n\nYou can extract the tarball, inspect the files, and run the tool directly with:\n\n```bash\ntar -xzf pip_fund_package.tar.gz\npython pip_fund/src/pip_fund/fund.py --help\n```\n\nor install it locally in editable mode (assuming network access for setuptools is available):\n\n```bash\ncd pip_fund\npython -m pip install -e .        # install with basic features\npython -m pip install -e .[github]  # install with optional GitHub support\npip-fund                           # run the installed command\n```\n\nRemember to set `GITHUB_TOKEN` before using the `--github` flag.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecite%2Fpip-fund","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecite%2Fpip-fund","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecite%2Fpip-fund/lists"}