================================================================================
gitfs2
================================================================================
.. image:: https://api.travis-ci.org/moremoban/gitfs2.svg
:target: http://travis-ci.org/moremoban/gitfs2
.. image:: https://codecov.io/github/moremoban/gitfs2/coverage.png
:target: https://codecov.io/github/moremoban/gitfs2
.. image:: https://badge.fury.io/py/gitfs2.svg
:target: https://pypi.org/project/gitfs2
.. image:: https://pepy.tech/badge/gitfs2/month
:target: https://pepy.tech/project/gitfs2
.. image:: https://img.shields.io/github/stars/moremoban/gitfs2.svg?style=social&maxAge=3600&label=Star
:target: https://github.com/moremoban/gitfs2/stargazers
.. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=%E6%A8%A1%E7%89%88%E6%9B%B4%E6%96%B0&color=blue&style=flat-square
:target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects
.. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square
:target: https://github.com/psf/black
.. image:: https://dev.azure.com/moremoban/gitfs2/_apis/build/status/moremoban.gitfs2?branchName=master
:target: https://dev.azure.com/moremoban/gitfs2/_build/latest?definitionId=2&branchName=master
It helps perform `file operations <https://docs.pyfilesystem.org/en/latest/guide.html>`_ over a git repository.
It clones the git repository and returns python file system 2's `OSFS <https://docs.pyfilesystem.org/en/latest/reference/osfs.html>`_ instance.
The idea originates from `moban <https://github.com/moremoban/moban>`_, which uses git repositories as
a vehicle to have versioned templates for the creation of a new python package. Surely, it can be implemented
in any other ways but moban v0.6.0 mandates python file system 2 interface. Hence this library is written.
Get a file inside a python package
--------------------------------------------------------------------------------
.. code-block:: python
>>> import fs
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git!/templates")
>>> git_fs.readtext("_version.py.jj2")
'__version__ = "0.0.5"\n__author__ = "C.W."\n'
Get from a different branch
--------------------------------------------------------------------------------
.. code-block:: python
>>> import fs
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git?branch=master!/templates")
>>> git_fs.read("_version.py.jj2")
'__version__ = "0.0.5"\n__author__ = "C.W."\n'
Checkout submodules recursively
--------------------------------------------------------------------------------
.. code-block:: python
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git?branch=master&submodule=true!/templates")
Does it write?
--------------------------------------------------------------------------------
Yes locally, it will write as you can do so without using gitfs2. And no, it
does not help commit and push the changes for you.
Plus, the intention is never to write to a repository.
Primary use case
--------------------------------------------------------------------------------
You can do the following with moban:
.. code-block:: bash
$ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \
-c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \
-o _version.py
Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans
Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py
Templated 1 file.
$ cat _version.py
__version__ = "0.1.1rc3"
__author__ = "C.W."
License
--------------------------------------------------------------------------------
MIT
Installation
================================================================================
You can install gitfs2 via pip:
.. code-block:: bash
$ pip install gitfs2
or clone it and install it:
.. code-block:: bash
$ git clone https://github.com/moremoban/gitfs2.git
$ cd gitfs2
$ python setup.py install
Change log
================================================================================
0.0.5 - 09.11.2024
--------------------------------------------------------------------------------
**Added**
#. `#12 <https://github.com/moremoban/gitfs2/issues/12>`_:fix github protocol
timeout problem
0.0.4 - 11.10.2024
--------------------------------------------------------------------------------
**Added**
#. `#12 <https://github.com/moremoban/gitfs2/issues/12>`_:fix github protocol
timeout problem
0.0.3 - 11.12.2019
--------------------------------------------------------------------------------
**Added**
#. `#5 <https://github.com/moremoban/gitfs2/issues/5>`_: support offline
#. `#7 <https://github.com/moremoban/gitfs2/issues/7>`_: add license text
0.0.2 - 2.10.2019
--------------------------------------------------------------------------------
**Fixed**
#. `#4 <https://github.com/moremoban/gitfs2/issues/4>`_: failed to checkout more
than one git repo.
0.0.1 - 19.08.2019
--------------------------------------------------------------------------------
**first release**
#. what a feat!
Raw data
{
"_id": null,
"home_page": "https://github.com/moremoban/gitfs2",
"name": "gitfs2",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python",
"author": "C.W.",
"author_email": "wangc_2011@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/98/c2/6118c9a1e0757087e7293acffe29e37667df7474da00711ad7470f58c3f2/gitfs2-0.0.5.tar.gz",
"platform": null,
"description": "================================================================================\ngitfs2\n================================================================================\n\n.. image:: https://api.travis-ci.org/moremoban/gitfs2.svg\n :target: http://travis-ci.org/moremoban/gitfs2\n\n.. image:: https://codecov.io/github/moremoban/gitfs2/coverage.png\n :target: https://codecov.io/github/moremoban/gitfs2\n.. image:: https://badge.fury.io/py/gitfs2.svg\n :target: https://pypi.org/project/gitfs2\n\n.. image:: https://pepy.tech/badge/gitfs2/month\n :target: https://pepy.tech/project/gitfs2\n\n.. image:: https://img.shields.io/github/stars/moremoban/gitfs2.svg?style=social&maxAge=3600&label=Star\n :target: https://github.com/moremoban/gitfs2/stargazers\n\n.. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=%E6%A8%A1%E7%89%88%E6%9B%B4%E6%96%B0&color=blue&style=flat-square\n :target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects\n\n.. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square\n :target: https://github.com/psf/black\n\n.. image:: https://dev.azure.com/moremoban/gitfs2/_apis/build/status/moremoban.gitfs2?branchName=master\n :target: https://dev.azure.com/moremoban/gitfs2/_build/latest?definitionId=2&branchName=master\n\n\nIt helps perform `file operations <https://docs.pyfilesystem.org/en/latest/guide.html>`_ over a git repository.\nIt clones the git repository and returns python file system 2's `OSFS <https://docs.pyfilesystem.org/en/latest/reference/osfs.html>`_ instance.\n\nThe idea originates from `moban <https://github.com/moremoban/moban>`_, which uses git repositories as\na vehicle to have versioned templates for the creation of a new python package. Surely, it can be implemented\nin any other ways but moban v0.6.0 mandates python file system 2 interface. Hence this library is written.\n\nGet a file inside a python package\n--------------------------------------------------------------------------------\n\n.. code-block:: python\n\n >>> import fs\n >>> git_fs = fs.open_fs(\"git://github.com/moremobans/pypi-mobans.git!/templates\")\n >>> git_fs.readtext(\"_version.py.jj2\")\n '__version__ = \"0.0.5\"\\n__author__ = \"C.W.\"\\n'\n\n\nGet from a different branch\n--------------------------------------------------------------------------------\n\n.. code-block:: python\n\n >>> import fs\n >>> git_fs = fs.open_fs(\"git://github.com/moremobans/pypi-mobans.git?branch=master!/templates\")\n >>> git_fs.read(\"_version.py.jj2\")\n '__version__ = \"0.0.5\"\\n__author__ = \"C.W.\"\\n'\n\n\nCheckout submodules recursively\n--------------------------------------------------------------------------------\n\n.. code-block:: python\n\n >>> git_fs = fs.open_fs(\"git://github.com/moremobans/pypi-mobans.git?branch=master&submodule=true!/templates\")\n\n\nDoes it write?\n--------------------------------------------------------------------------------\n\nYes locally, it will write as you can do so without using gitfs2. And no, it\ndoes not help commit and push the changes for you.\n\nPlus, the intention is never to write to a repository.\n\nPrimary use case\n--------------------------------------------------------------------------------\n\nYou can do the following with moban:\n\n.. code-block:: bash\n\n $ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \\\n -c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \\\n -o _version.py\n Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans\n Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py\n Templated 1 file.\n $ cat _version.py\n __version__ = \"0.1.1rc3\"\n __author__ = \"C.W.\"\n\n\n\nLicense\n--------------------------------------------------------------------------------\n\nMIT\n\n\nInstallation\n================================================================================\n\n\nYou can install gitfs2 via pip:\n\n.. code-block:: bash\n\n $ pip install gitfs2\n\n\nor clone it and install it:\n\n.. code-block:: bash\n\n $ git clone https://github.com/moremoban/gitfs2.git\n $ cd gitfs2\n $ python setup.py install\n\nChange log\n================================================================================\n\n0.0.5 - 09.11.2024\n--------------------------------------------------------------------------------\n\n**Added**\n\n#. `#12 <https://github.com/moremoban/gitfs2/issues/12>`_:fix github protocol\n timeout problem\n\n0.0.4 - 11.10.2024\n--------------------------------------------------------------------------------\n\n**Added**\n\n#. `#12 <https://github.com/moremoban/gitfs2/issues/12>`_:fix github protocol\n timeout problem\n\n0.0.3 - 11.12.2019\n--------------------------------------------------------------------------------\n\n**Added**\n\n#. `#5 <https://github.com/moremoban/gitfs2/issues/5>`_: support offline\n#. `#7 <https://github.com/moremoban/gitfs2/issues/7>`_: add license text\n\n0.0.2 - 2.10.2019\n--------------------------------------------------------------------------------\n\n**Fixed**\n\n#. `#4 <https://github.com/moremoban/gitfs2/issues/4>`_: failed to checkout more\n than one git repo.\n\n0.0.1 - 19.08.2019\n--------------------------------------------------------------------------------\n\n**first release**\n\n#. what a feat!\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python file system 2 over GitPython",
"version": "0.0.5",
"project_urls": {
"Download": "https://github.com/moremoban/gitfs2/archive/0.0.5.tar.gz",
"Homepage": "https://github.com/moremoban/gitfs2"
},
"split_keywords": [
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cda1354faf9b8cabaf7865c654c2522aabf46b1a3d63b7c620afb7eecb7d392d",
"md5": "8901309f3631861f8a69d68965f14317",
"sha256": "d6a3c197e2609039edbcde87df97560dada17d7d4a66491487c74a05d814924a"
},
"downloads": -1,
"filename": "gitfs2-0.0.5-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "8901309f3631861f8a69d68965f14317",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6916,
"upload_time": "2024-11-09T12:21:42",
"upload_time_iso_8601": "2024-11-09T12:21:42.721785Z",
"url": "https://files.pythonhosted.org/packages/cd/a1/354faf9b8cabaf7865c654c2522aabf46b1a3d63b7c620afb7eecb7d392d/gitfs2-0.0.5-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "98c26118c9a1e0757087e7293acffe29e37667df7474da00711ad7470f58c3f2",
"md5": "c4bcad98e0c59dcf262cae29ead62a28",
"sha256": "dbf4190be02e019dc1e134232871ca920029ba3b6f7bf8570a259cfdb60ccc35"
},
"downloads": -1,
"filename": "gitfs2-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "c4bcad98e0c59dcf262cae29ead62a28",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9514,
"upload_time": "2024-11-09T12:21:44",
"upload_time_iso_8601": "2024-11-09T12:21:44.243675Z",
"url": "https://files.pythonhosted.org/packages/98/c2/6118c9a1e0757087e7293acffe29e37667df7474da00711ad7470f58c3f2/gitfs2-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-09 12:21:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "moremoban",
"github_project": "gitfs2",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "fs",
"specs": []
},
{
"name": "crayons",
"specs": []
},
{
"name": "GitPython",
"specs": []
},
{
"name": "git-url-parse",
"specs": [
[
">=",
"1.2.2"
]
]
}
],
"lcname": "gitfs2"
}