gfal2-python


Namegfal2-python JSON
Version 1.13.0 PyPI version JSON
download
home_pagehttps://dmc.web.cern.ch/
SummaryPython3 bindings for Gfal2
upload_time2024-09-13 10:33:42
maintainerNone
docs_urlhttps://pythonhosted.org/gfal2-python/
authorDMC Devel
requires_pythonNone
licenseApache 2
keywords gfal2 grid dmc data management clients
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Gfal2-Python
============

``gfal2-python`` is a C++ library offering a thin layer of Python
wrappers via ``PyBoost``. We recommend installing it via RPMs, but it is
also available on
`PyPI/gfal2-python <https://pypi.org/project/gfal2-python/>`__.

Using the Gfal2 Python Bindings
-------------------------------

The Gfal2 Python bindings are intended to be easy to use.

Pre-requisites
^^^^^^^^^^^^^^

Before jumping into usage, ensure you have a proxy certificate available
in the default location (``/tmp/x509up_u$(id -u)``).

Optionally, you may want to install relevant Gfal2 protocol plugins. Our
example will use HTTP protocol, so we must ensure we have the Gfal2 HTTP
plugin installed:

.. code:: bash

   $ dnf install -y gfal2-plugin-http

Examples
^^^^^^^^

Example of stating a file location:

.. code:: python

   import gfal2

   ctx = gfal2.creat_context()
   ctx.stat("https://eospublic.cern.ch/eos/opstest/dteam/file.test")

Example of copying a file from local to remote:

.. code:: python

   import gfal2

   ctx = gfal2.creat_context()
   ctx.filecopy("file:///tmp/file.test", "https://eospublic.cern.ch/eos/opstest/dteam/file.test")
   ctx.stat("https://eospublic.cern.ch/eos/opstest/dteam/file.test")

Example of copying the file from remote to local (with custom transfer
parameters):

.. code:: python

   import gfal2

   ctx = gfal2.creat_context()
   params = ctx.transfer_parameters()
   params.set_checksum = ("both", "adler32", None)
   params.overwrite = True

   ctx.filecopy("https://eospublic.cern.ch/eos/opstest/dteam/file.test", "file:///tmp/file.test")
   ctx.checksum("file:///tmp/file.test", "adler32")

Further code examples can be found in the
`example/python/ <https://github.com/cern-fts/gfal2-python/tree/v1.12.2/example/python>`__
source directory.

Installing via Pip
------------------

Installing the package via ``pip install gfal2-python`` will reproduce
the compilation process, hence why you need to make sure you have all
the right dependencies. This guide details the steps needed to get all
the dependencies, starting from a *blank* machine.

This guide assumes you have the EPEL repositories installed
(``epel-release`` package). In this example, the build platform is
``Alma9`` and we will use ``v1.12.2``, but the same process applies for
other versions or build platforms.

.. code:: bash

   # Clone the gfal2-python repository with the desired version (example for v1.12.2)
   $ git clone --branch v1.12.2 https://github.com/cern-fts/gfal2-python.git
   $ cd gfal2-python/

   # Install standard set of build packages
   $ ./ci/fedora-packages.sh

   # Build the source RPM and install dependencies
   $ cd packaging/
   $ make srpm
   $ dnf builddep -y gfal2-python-*.src.rpm

   # Ready to install now from PyPI
   $ pip install gfal2-python

Useful links
------------

-  DMC documentation: https://dmc-docs.web.cern.ch/dmc-docs/
-  Apache License, version 2.0:
   https://www.apache.org/licenses/LICENSE-2.0
-  Issue tracking: https://github.com/cern-fts/gfal2-python/issues
-  Support channels: dmc-support@cern.ch
-  Development team contact: dmc-devel@cern.ch

Enjoy using the Gfal2 Python bindings!
            

Raw data

            {
    "_id": null,
    "home_page": "https://dmc.web.cern.ch/",
    "name": "gfal2-python",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/gfal2-python/",
    "requires_python": null,
    "maintainer_email": "dmc-devel@cern.ch",
    "keywords": "gfal2, grid, dmc, data management clients",
    "author": "DMC Devel",
    "author_email": "dmc-devel@cern.ch",
    "download_url": "https://files.pythonhosted.org/packages/6b/88/335f56f3286bff5fde448d92eede5b6fe192f4b25a6fe829bededb4136c5/gfal2-python-1.13.0.tar.gz",
    "platform": "GNU/Linux",
    "description": "Gfal2-Python\n============\n\n``gfal2-python`` is a C++ library offering a thin layer of Python\nwrappers via ``PyBoost``. We recommend installing it via RPMs, but it is\nalso available on\n`PyPI/gfal2-python <https://pypi.org/project/gfal2-python/>`__.\n\nUsing the Gfal2 Python Bindings\n-------------------------------\n\nThe Gfal2 Python bindings are intended to be easy to use.\n\nPre-requisites\n^^^^^^^^^^^^^^\n\nBefore jumping into usage, ensure you have a proxy certificate available\nin the default location (``/tmp/x509up_u$(id -u)``).\n\nOptionally, you may want to install relevant Gfal2 protocol plugins. Our\nexample will use HTTP protocol, so we must ensure we have the Gfal2 HTTP\nplugin installed:\n\n.. code:: bash\n\n   $ dnf install -y gfal2-plugin-http\n\nExamples\n^^^^^^^^\n\nExample of stating a file location:\n\n.. code:: python\n\n   import gfal2\n\n   ctx = gfal2.creat_context()\n   ctx.stat(\"https://eospublic.cern.ch/eos/opstest/dteam/file.test\")\n\nExample of copying a file from local to remote:\n\n.. code:: python\n\n   import gfal2\n\n   ctx = gfal2.creat_context()\n   ctx.filecopy(\"file:///tmp/file.test\", \"https://eospublic.cern.ch/eos/opstest/dteam/file.test\")\n   ctx.stat(\"https://eospublic.cern.ch/eos/opstest/dteam/file.test\")\n\nExample of copying the file from remote to local (with custom transfer\nparameters):\n\n.. code:: python\n\n   import gfal2\n\n   ctx = gfal2.creat_context()\n   params = ctx.transfer_parameters()\n   params.set_checksum = (\"both\", \"adler32\", None)\n   params.overwrite = True\n\n   ctx.filecopy(\"https://eospublic.cern.ch/eos/opstest/dteam/file.test\", \"file:///tmp/file.test\")\n   ctx.checksum(\"file:///tmp/file.test\", \"adler32\")\n\nFurther code examples can be found in the\n`example/python/ <https://github.com/cern-fts/gfal2-python/tree/v1.12.2/example/python>`__\nsource directory.\n\nInstalling via Pip\n------------------\n\nInstalling the package via ``pip install gfal2-python`` will reproduce\nthe compilation process, hence why you need to make sure you have all\nthe right dependencies. This guide details the steps needed to get all\nthe dependencies, starting from a *blank* machine.\n\nThis guide assumes you have the EPEL repositories installed\n(``epel-release`` package). In this example, the build platform is\n``Alma9`` and we will use ``v1.12.2``, but the same process applies for\nother versions or build platforms.\n\n.. code:: bash\n\n   # Clone the gfal2-python repository with the desired version (example for v1.12.2)\n   $ git clone --branch v1.12.2 https://github.com/cern-fts/gfal2-python.git\n   $ cd gfal2-python/\n\n   # Install standard set of build packages\n   $ ./ci/fedora-packages.sh\n\n   # Build the source RPM and install dependencies\n   $ cd packaging/\n   $ make srpm\n   $ dnf builddep -y gfal2-python-*.src.rpm\n\n   # Ready to install now from PyPI\n   $ pip install gfal2-python\n\nUseful links\n------------\n\n-  DMC documentation: https://dmc-docs.web.cern.ch/dmc-docs/\n-  Apache License, version 2.0:\n   https://www.apache.org/licenses/LICENSE-2.0\n-  Issue tracking: https://github.com/cern-fts/gfal2-python/issues\n-  Support channels: dmc-support@cern.ch\n-  Development team contact: dmc-devel@cern.ch\n\nEnjoy using the Gfal2 Python bindings!",
    "bugtrack_url": null,
    "license": "Apache 2",
    "summary": "Python3 bindings for Gfal2",
    "version": "1.13.0",
    "project_urls": {
        "Download": "https://gitlab.cern.ch/dmc/gfal2-bindings",
        "Homepage": "https://dmc.web.cern.ch/"
    },
    "split_keywords": [
        "gfal2",
        " grid",
        " dmc",
        " data management clients"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b88335f56f3286bff5fde448d92eede5b6fe192f4b25a6fe829bededb4136c5",
                "md5": "a7c51a3add595b94cdb5eed7bcb39997",
                "sha256": "5be42cc894fa20af3d6f6dbb30dfd4d29ab49bd5f15b3e3e754aa25c5ed17997"
            },
            "downloads": -1,
            "filename": "gfal2-python-1.13.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a7c51a3add595b94cdb5eed7bcb39997",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 42724,
            "upload_time": "2024-09-13T10:33:42",
            "upload_time_iso_8601": "2024-09-13T10:33:42.486879Z",
            "url": "https://files.pythonhosted.org/packages/6b/88/335f56f3286bff5fde448d92eede5b6fe192f4b25a6fe829bededb4136c5/gfal2-python-1.13.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-13 10:33:42",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gfal2-python"
}
        
Elapsed time: 1.10324s