# Git2Vec
Git2Vec is a Python package for handling Git data. It provides functionality to load and process Git repositories, and supports concurrent file loading for improved performance. The package can be found on [PyPI](https://pypi.org/project/git2vec/).
## Installation
To install Git2Vec, run the following command:
```bash
pip install git2vec
```
## Setup
Before using Git2Vec, make sure to have the following dependencies installed:
- langchain
- pinecone-client
- tiktoken
- gitpython
- python-dotenv
- pandas
You can install them using the following command:
```bash
pip install -r requirements.txt
```
## Usage
### Loading Git Repositories
The main functionality of Git2Vec is provided by the `loader.py` module. Here's an example of how to use the `pull_code_from_repo` function to load a Git repository:
```python
from git2vec.loader import pull_code_from_repo
repo_url = "https://github.com/username/repo.git"
branch = "main"
repo_data = pull_code_from_repo(repo_url, branch)
```
### Getting Top Repositories
You can use the `get_top_repos` function to fetch the top repositories based on certain criteria:
```python
from git2vec.loader import get_top_repos
n_repos = 10
last_n_days = 30
language = "Python"
sort = "stars"
order = "desc"
top_repos = get_top_repos(n_repos, last_n_days, language, sort, order)
```
### Pipeline Fetch and Load
The `pipeline_fetch_and_load` function can be used to fetch and load repositories in a single step:
```python
from git2vec.loader import pipeline_fetch_and_load
n_repos = 10
last_n_days = 30
language = "Python"
sort = "stars"
order = "desc"
github_data = pipeline_fetch_and_load(n_repos, last_n_days, language, sort, order)
```
## Contributing
If you'd like to contribute to Git2Vec, feel free to fork the repository and submit a pull request. If you have any questions or issues, please open an issue on the GitHub repository.
## License
Git2Vec is released under the MIT License.
Raw data
{
"_id": null,
"home_page": "https://github.com/voynow/git2vec",
"name": "git2vec",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Jamie Voynow",
"author_email": "voynow99@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4f/88/e7d26ba18928ec5f081df0c51b344fa3b0c4e1e94919b25f309696f6890f/git2vec-0.1.8.tar.gz",
"platform": null,
"description": "# Git2Vec\r\n\r\nGit2Vec is a Python package for handling Git data. It provides functionality to load and process Git repositories, and supports concurrent file loading for improved performance. The package can be found on [PyPI](https://pypi.org/project/git2vec/).\r\n\r\n## Installation\r\n\r\nTo install Git2Vec, run the following command:\r\n\r\n```bash\r\npip install git2vec\r\n```\r\n\r\n## Setup\r\n\r\nBefore using Git2Vec, make sure to have the following dependencies installed:\r\n\r\n- langchain\r\n- pinecone-client\r\n- tiktoken\r\n- gitpython\r\n- python-dotenv\r\n- pandas\r\n\r\nYou can install them using the following command:\r\n\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n## Usage\r\n\r\n### Loading Git Repositories\r\n\r\nThe main functionality of Git2Vec is provided by the `loader.py` module. Here's an example of how to use the `pull_code_from_repo` function to load a Git repository:\r\n\r\n```python\r\nfrom git2vec.loader import pull_code_from_repo\r\n\r\nrepo_url = \"https://github.com/username/repo.git\"\r\nbranch = \"main\"\r\n\r\nrepo_data = pull_code_from_repo(repo_url, branch)\r\n```\r\n\r\n### Getting Top Repositories\r\n\r\nYou can use the `get_top_repos` function to fetch the top repositories based on certain criteria:\r\n\r\n```python\r\nfrom git2vec.loader import get_top_repos\r\n\r\nn_repos = 10\r\nlast_n_days = 30\r\nlanguage = \"Python\"\r\nsort = \"stars\"\r\norder = \"desc\"\r\n\r\ntop_repos = get_top_repos(n_repos, last_n_days, language, sort, order)\r\n```\r\n\r\n### Pipeline Fetch and Load\r\n\r\nThe `pipeline_fetch_and_load` function can be used to fetch and load repositories in a single step:\r\n\r\n```python\r\nfrom git2vec.loader import pipeline_fetch_and_load\r\n\r\nn_repos = 10\r\nlast_n_days = 30\r\nlanguage = \"Python\"\r\nsort = \"stars\"\r\norder = \"desc\"\r\n\r\ngithub_data = pipeline_fetch_and_load(n_repos, last_n_days, language, sort, order)\r\n```\r\n\r\n## Contributing\r\n\r\nIf you'd like to contribute to Git2Vec, feel free to fork the repository and submit a pull request. If you have any questions or issues, please open an issue on the GitHub repository.\r\n\r\n## License\r\n\r\nGit2Vec is released under the MIT License.\r\n",
"bugtrack_url": null,
"license": "",
"summary": "A useful module for handling Git data.",
"version": "0.1.8",
"project_urls": {
"Homepage": "https://github.com/voynow/git2vec"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c27b33e26f9ee24b0c16d025ce3b0df64dea2fe2010907106f58b4a782de9ee3",
"md5": "13aeecaeb8ab36bb79707932d0d26b1a",
"sha256": "e82c70a1a002de0fd493ea5b1c1f12cfbd8e413e4e8e919542c61455c0f0ad0f"
},
"downloads": -1,
"filename": "git2vec-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "13aeecaeb8ab36bb79707932d0d26b1a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6644,
"upload_time": "2023-06-16T19:47:31",
"upload_time_iso_8601": "2023-06-16T19:47:31.116026Z",
"url": "https://files.pythonhosted.org/packages/c2/7b/33e26f9ee24b0c16d025ce3b0df64dea2fe2010907106f58b4a782de9ee3/git2vec-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4f88e7d26ba18928ec5f081df0c51b344fa3b0c4e1e94919b25f309696f6890f",
"md5": "0eb114a2dc0ee41699b64977644db21d",
"sha256": "54ffe581d163d2ac7ee2bc41962bf0e198aee94323771bb87b9620273881d94b"
},
"downloads": -1,
"filename": "git2vec-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "0eb114a2dc0ee41699b64977644db21d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6167,
"upload_time": "2023-06-16T19:47:32",
"upload_time_iso_8601": "2023-06-16T19:47:32.566177Z",
"url": "https://files.pythonhosted.org/packages/4f/88/e7d26ba18928ec5f081df0c51b344fa3b0c4e1e94919b25f309696f6890f/git2vec-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-16 19:47:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "voynow",
"github_project": "git2vec",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "git2vec"
}