# pip‑fund
`pip‑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.
## Features
* **Normalises labels and URLs:** Funding links are detected by
examining `Project‑URL` metadata and matching normalised 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.
* **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.
* **Multiple output formats:** Choose human‑readable text (default),
JSON (`--json`) or Markdown (`--markdown`).
* **Remote lookups:** Use the `--remote` flag to query the PyPI JSON
API for funding links of packages that are not installed locally.
* **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.
## Installation
### Basic usage
```bash
pip install pip-fund
# Scan all installed packages for funding information
pip-fund
# Check specific packages (installed or not) and query PyPI if needed
pip-fund --remote requests flask
# Output Markdown instead of plain text
pip-fund --markdown
```
### Enabling GitHub sponsor integration
To 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.
```bash
pip install pip-fund[github]
export GITHUB_TOKEN=ghp_yourtokenhere
pip-fund --github flask
```
## Usage
Running `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.
Use 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.
## Project structure
This project follows the modern Python packaging guidelines:
* A `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`【917575989859582†L503-L507】.
* Source code lives in the `src/pip_fund/` package. The main module
`fund.py` implements the logic of detecting funding links.
* Optional 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.
## Contributing
Contributions are welcome! Feature requests, bug reports and pull
requests are greatly appreciated. Areas of interest include:
* Improving detection of funding links in package metadata
* Supporting additional donation platforms
* Enhancing the GitHub sponsor integration
* Adding interactive prompts or browser integration to open funding
pages directly from the CLI
## License
This project is released under the MIT License.
Raw data
{
"_id": null,
"home_page": null,
"name": "pip-fund",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Gaurav Sood <gsood07@gmail.com>",
"keywords": "funding, sponsorship, open-source, packaging, pypi, donations, npm-fund",
"author": null,
"author_email": "Gaurav Sood <gsood07@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/5e/e2/146532ed4d9a48b76c056b74def481fcbf03c0feadf52c52fee2775b8bfb/pip_fund-0.1.0.tar.gz",
"platform": null,
"description": "# pip\u2011fund\n\n`pip\u2011fund` is a small command\u2011line tool that scans your Python\nenvironment (or a list of package names) and reports any funding or\nsponsorship links it can find. It is inspired by Node.js\u2019s\n`npm fund` command and uses Python\u2019s packaging metadata to discover\nfunding information. The goal is to make it easy for developers to\ndiscover how to support the open\u2011source libraries they depend on.\n\n## Features\n\n* **Normalises labels and URLs:** Funding links are detected by\n examining `Project\u2011URL` metadata and matching normalised labels\n against a set of known aliases such as `funding`, `sponsor`,\n `donate` and `donation`. Labels containing the words `fund` or\n `sponsor` are also matched. Query strings and fragments are\n stripped from URLs before grouping, so links that differ only by\n tracking parameters are treated as the same.\n* **Groups duplicate links:** When multiple packages share the same\n funding URL, the tool groups them into a single entry and lists\n all associated package names.\n* **Multiple output formats:** Choose human\u2011readable text (default),\n JSON (`--json`) or Markdown (`--markdown`).\n* **Remote lookups:** Use the `--remote` flag to query the PyPI JSON\n API for funding links of packages that are not installed locally.\n* **Optional GitHub sponsor support:** When installed with the\n `github` extra (`pip install pip\u2011fund[github]`), the tool can\n attempt to fetch sponsor links from a repository\u2019s\n `.github/FUNDING.yml` file on GitHub if no funding metadata is\n 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\nprovide a GitHub personal access token via the `GITHUB_TOKEN` environment\nvariable. Without a token the GitHub API will operate with very\nlimited 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\ndistributions in the current Python environment. For each unique\nfunding link found, it prints the label, the URL and the names of\npackages that declare it. If no funding information is discovered,\nthe tool explains why this might be the case.\n\nUse the `--json` or `--markdown` flags to produce machine\u2011readable\noutput. Combine `--remote` with package names to query funding\ninformation for packages that aren\u2019t installed.\n\n## Project structure\n\nThis project follows the modern Python packaging guidelines:\n\n* A `pyproject.toml` file declares the build system (`setuptools`) and\n metadata such as the project name, version and console script\n entry point. The `[project.scripts]` table instructs the build\n backend to generate a `pip-fund` command that invokes the\n `main()` function in `pip_fund/fund.py`\u3010917575989859582\u2020L503-L507\u3011.\n* Source code lives in the `src/pip_fund/` package. The main module\n `fund.py` implements the logic of detecting funding links.\n* Optional dependencies for GitHub sponsor support are defined under\n `[project.optional-dependencies]` in `pyproject.toml`. Installing\n with `pip install pip-fund[github]` adds the `PyGithub` and\n `PyYAML` libraries.\n\n## Contributing\n\nContributions are welcome! Feature requests, bug reports and pull\nrequests 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\n pages directly from the CLI\n\n## License\n\nThis project is released under the MIT License.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Enumerate funding links for Python packages",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/gojiplus/pip-fund/issues",
"Documentation": "https://github.com/gojiplus/pip-fund#readme",
"Funding": "https://github.com/sponsors/soodoku",
"Homepage": "https://github.com/gojiplus/pip-fund",
"Repository": "https://github.com/gojiplus/pip-fund.git"
},
"split_keywords": [
"funding",
" sponsorship",
" open-source",
" packaging",
" pypi",
" donations",
" npm-fund"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "206b7c1eda8a17c8d7ca9b7bf46754c44d9a44a7a56d4d038fb57bcd8b68099b",
"md5": "326ec69e11da0b5d11989318223fb020",
"sha256": "ddae6943eeff4b896015d666070486fcb78c6b7fa2d063ea7e0620e6a480cfb2"
},
"downloads": -1,
"filename": "pip_fund-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "326ec69e11da0b5d11989318223fb020",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9779,
"upload_time": "2025-07-19T01:35:52",
"upload_time_iso_8601": "2025-07-19T01:35:52.871560Z",
"url": "https://files.pythonhosted.org/packages/20/6b/7c1eda8a17c8d7ca9b7bf46754c44d9a44a7a56d4d038fb57bcd8b68099b/pip_fund-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5ee2146532ed4d9a48b76c056b74def481fcbf03c0feadf52c52fee2775b8bfb",
"md5": "abbfa76ed76c482c64f8b8fd5f534382",
"sha256": "a98309a059a6aa1ca7f3c2d56996c09a37309a91cc87db4b805185b7f2dba17e"
},
"downloads": -1,
"filename": "pip_fund-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "abbfa76ed76c482c64f8b8fd5f534382",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11683,
"upload_time": "2025-07-19T01:35:54",
"upload_time_iso_8601": "2025-07-19T01:35:54.208912Z",
"url": "https://files.pythonhosted.org/packages/5e/e2/146532ed4d9a48b76c056b74def481fcbf03c0feadf52c52fee2775b8bfb/pip_fund-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-19 01:35:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gojiplus",
"github_project": "pip-fund",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pip-fund"
}