PuReX - Pull Request data eXtractor
Project description
Installation
PuReX can be installed from PyPI.
Using pip:
pip install purex
Using uv (recommended):
uv add purex
To install the documentation, you can install purex[doc] instead of purex.
uv add purex[doc]
To install from the source, clone this repository, cd into the directory and run the following command:
pip install -e .
Basic Usage
First thing to do after the installation, is to set the environment variable token. This token is your GitHub token that will be used for sending the requests to GitHub REST API. Although including the token is not necessary, but it can be helpful for a faster extraction, specially for bigger projects, since it has a higher rate limit than the public API.
In UNIX-like (GNU/Linux, Mac OS) operating systems:
export PUREX_TOKEN="YOUR TOKEN"
In Windows operating system:
set PUREX_TOKEN="YOUR_TOKEN"
For getting help about the PuReX, you can run it without any extra command or just pass the help option:
purex --help
It shows the general help of the tool:
Usage: purex [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
get Get pull-request data of a repository.
Getting Data from a Repository
The help option is also available for every subcommand. For example for get command:
purex get --help
Outputs:
Usage: purex get [OPTIONS] OWNER REPOSITORY
GET pull-request data for REPOSITY from OWNER.
OWNER is the account name that hosts the repository (e.g., torvalds).
REPOSITORY is the name of the repository (e.g., linux).
Options:
-t, --token TEXT GitHub Token
-u, --base_url TEXT REST API url of GitHub.
--start_date [%m-%d-%Y] Inclusive starting date (MM-DD-YYYY) for pulling
the pull-request data.
--help Show this message and exit.
Example: Let's say we want to get the pull-request information of furo package by pradyunsg starting from 01-01-2024 until the current date. We can use PuReX like this:
purex get pradyunsg furo --start_date 01-01-2024
PuReX will extract the information of the requested repository within the selected time delta, and finally finds the maintainers responsible for closing or merging those PRs and returns the results in JSON format:
{
'pradyunsg': {'closed': 7, 'merged': 36},
'dependabot[bot]': {'closed': 3, 'merged': 0},
'ferdnyc': {'closed': 1, 'merged': 0},
'M-ZubairAhmed': {'closed': 1, 'merged': 0}
}
The results shows the number of PRs closed/merged by each maitainer.
For more info and tutorials, please refer to the documentation.
About
Publications
If you use PuReX in your research, please cite it as follows:
@software{PuReX,
author = {Mokhtari Koushyar, Javad},
doi = {10.5281/zenodo.15851126},
month = {2},
title = {{PuReX, Pull-Request Extractor}},
url = {https://github.com/j0m0k0/PuReX},
year = {2025}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file purex-0.1.2.tar.gz.
File metadata
- Download URL: purex-0.1.2.tar.gz
- Upload date:
- Size: 784.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91a11e4cbf155af54c94e0848528db2cb4885752d971cb8d8cfc462fcee4c9ed
|
|
| MD5 |
26b7b3d630910f1236c5c1ce2a2e220e
|
|
| BLAKE2b-256 |
3c0bf563113dc949132fbe9f2345dd9b4b3db5b761deb3712c219e3ab68f86fc
|
File details
Details for the file purex-0.1.2-py3-none-any.whl.
File metadata
- Download URL: purex-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03b1731e333dc594fd3aa519849d4becb48acf77fe7ce289251e2e8efcc49dd7
|
|
| MD5 |
658e1c978147d7e4745052c33e0b9be2
|
|
| BLAKE2b-256 |
d7c0454faa8f568afd6d584def9c587bb01d6fc19f4597bc089c83b7773604c0
|