Name | gitpathlib JSON |
Version |
0.3
JSON |
| download |
home_page | None |
Summary | Object-oriented paths in Git repositories |
upload_time | 2024-09-18 11:56:40 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT |
keywords |
git
pathlib
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
gitpathlib
==========
A read-only implementation of Python's `pathlib`_ that works on Git trees.
.. _pathlib: https://docs.python.org/3/library/pathlib.html
Installation
------------
This library requires `pygit2`_, which can be hard to install.
You may need to get it installed before installing gitpathlib.
In a Python 3 `virtual environment`_, do::
python -m pip install gitpathlib
To install an editable from a Git checkout::
python -m pip install -e.
To install without a virtual envitonment, add the ``--user`` option.
.. _pygit2: http://www.pygit2.org/
.. _virtual environment: https://docs.python.org/3/library/venv.html
Basic Usage
-----------
A GitPath can be created from a path to a Git repository, and a commit
(or tree) in it::
from gitpathlib import GitPath
head = GitPath('path/to/git/repo', 'HEAD')
It can then be used as a ``Path`` would::
path = head / 'dir' / 'file.txt'
with path.open() as f:
contents = f.read()
GitPath provides read-only access. Creating files, opening them in write
mode, etc. are not supported.
Development
-----------
You're welcome to join this project!
If you spot an issue, please report it at the `Issues page`_ on Github.
If you'd like to start changing the code or documentation, check out the code
locally using::
git clone https://github.com/encukou/gitpathlib
If you're new to this, please read the `this guide`_ about collaborating
on Github-hosted projects like this one.
If that doesn't make sense, please `e-mail the author <encukou@gmail.com>`_
for clarification. I'd be happy to help you get started.
.. _Issues page: https://github.com/encukou/gitpathlib/issues
.. _this guide: https://guides.github.com/activities/contributing-to-open-source/
Changelog
---------
0.3 (2023-09-18)
................
Update to work with recent git & pygit2
0.2 (2017-04-29)
................
Implement the pathlib API
0.1 (2017-04-18)
................
Initial public version
Raw data
{
"_id": null,
"home_page": null,
"name": "gitpathlib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "git, pathlib",
"author": null,
"author_email": "Petr Viktorin <encukou@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/35/29/c6b8d59243aee1628b97aa206dffa14eafd7f4c25558d46b929158f71290/gitpathlib-0.3.tar.gz",
"platform": null,
"description": "gitpathlib\n==========\n\nA read-only implementation of Python's `pathlib`_ that works on Git trees.\n\n.. _pathlib: https://docs.python.org/3/library/pathlib.html\n\nInstallation\n------------\n\nThis library requires `pygit2`_, which can be hard to install.\nYou may need to get it installed before installing gitpathlib.\n\n\nIn a Python 3 `virtual environment`_, do::\n\n python -m pip install gitpathlib\n\nTo install an editable from a Git checkout::\n\n python -m pip install -e.\n\nTo install without a virtual envitonment, add the ``--user`` option.\n\n.. _pygit2: http://www.pygit2.org/\n.. _virtual environment: https://docs.python.org/3/library/venv.html\n\n\nBasic Usage\n-----------\n\nA GitPath can be created from a path to a Git repository, and a commit\n(or tree) in it::\n\n from gitpathlib import GitPath\n\n head = GitPath('path/to/git/repo', 'HEAD')\n\nIt can then be used as a ``Path`` would::\n\n path = head / 'dir' / 'file.txt'\n with path.open() as f:\n contents = f.read()\n\nGitPath provides read-only access. Creating files, opening them in write\nmode, etc. are not supported.\n\n\nDevelopment\n-----------\n\nYou're welcome to join this project!\n\nIf you spot an issue, please report it at the `Issues page`_ on Github.\n\nIf you'd like to start changing the code or documentation, check out the code\nlocally using::\n\n git clone https://github.com/encukou/gitpathlib\n\nIf you're new to this, please read the `this guide`_ about collaborating\non Github-hosted projects like this one.\n\nIf that doesn't make sense, please `e-mail the author <encukou@gmail.com>`_\nfor clarification. I'd be happy to help you get started.\n\n.. _Issues page: https://github.com/encukou/gitpathlib/issues\n.. _this guide: https://guides.github.com/activities/contributing-to-open-source/\n\n\nChangelog\n---------\n\n0.3 (2023-09-18)\n................\n\nUpdate to work with recent git & pygit2\n\n\n0.2 (2017-04-29)\n................\n\nImplement the pathlib API\n\n\n0.1 (2017-04-18)\n................\n\nInitial public version\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Object-oriented paths in Git repositories",
"version": "0.3",
"project_urls": {
"Repository": "https://github.com/encukou/gitpathlib"
},
"split_keywords": [
"git",
" pathlib"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e476d1c6f1056911a790fd8b11c1f935dacb741c285e26191d55170a12526be3",
"md5": "116493aac792a8fff5ceda44599cb77d",
"sha256": "31ed892cb8269853f3a19d2e6e5b23fd2668898d1dc8821c99c3282bed8e3658"
},
"downloads": -1,
"filename": "gitpathlib-0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "116493aac792a8fff5ceda44599cb77d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 14936,
"upload_time": "2024-09-18T11:56:38",
"upload_time_iso_8601": "2024-09-18T11:56:38.608405Z",
"url": "https://files.pythonhosted.org/packages/e4/76/d1c6f1056911a790fd8b11c1f935dacb741c285e26191d55170a12526be3/gitpathlib-0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3529c6b8d59243aee1628b97aa206dffa14eafd7f4c25558d46b929158f71290",
"md5": "830bd8836b901848989b299ccbc45c76",
"sha256": "d5becc1a55a2e77d854bb72ace5c732a37e3ea69e3b39a3cc2436fd10e578f1c"
},
"downloads": -1,
"filename": "gitpathlib-0.3.tar.gz",
"has_sig": false,
"md5_digest": "830bd8836b901848989b299ccbc45c76",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 14658,
"upload_time": "2024-09-18T11:56:40",
"upload_time_iso_8601": "2024-09-18T11:56:40.398220Z",
"url": "https://files.pythonhosted.org/packages/35/29/c6b8d59243aee1628b97aa206dffa14eafd7f4c25558d46b929158f71290/gitpathlib-0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-18 11:56:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "encukou",
"github_project": "gitpathlib",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "gitpathlib"
}