bofh


Namebofh JSON
Version 0.9.8 PyPI version JSON
download
home_pagehttps://github.com/unioslo/pybofh
SummaryCerebrum bofh client
upload_time2023-05-30 14:15:56
maintainer
docs_urlNone
authorUSIT, University of Oslo
requires_python
licenseGPLv3
keywords cerebrum bofh xmlrpc client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            bofh
====

*bofh*, short for *brukerorganisering for hvermannsen*, is a [Cerebrum]
administration tool.

It is an interactive XML/RPC command line client for a
`Cerebrum.modules.bofhd` server.  It is unlikely you want to use this
software unless you know what Cerebrum is.


Install
-------

bofh is implemented in Python and supports Python runtimes 2.7
(>= 2.7.9, >= RHEL7 2.7.5), and 3.6 or newer.

If you are on RHEL we recommend that you install the bofh RPM package
from the university package repository:

    # dnf install python3-bofh

On other systems we recommend installing from the official Python package
index (PyPI) into a [virtualenv]:

    % virtualenv ~/venv
    % source ~/venv/bin/activate
    (venv) % pip install bofh


Use
---

    pybofh --help
    python -m bofh --help


Module usage
------------

```python
import bofh
from getpass import getuser, getpass

# Get a client by connecting to bofhd
url = 'https://example.org:8000'
client = bofh.connect(url=url)

# You'll need to authenticate to access restricted commands
client.login(getuser(), getpass())

# Call commands on the client object
try:
    # formatted output
    client.user.info('foo')

    # structured output
    client.run_command('user_info', 'foo')
finally:
    client.logout()
```


Documentation
-------------

You'll have to build the bofh documentation yourself (for now).

Documentation is built using *sphinx*, and build requirements are
specified in the [docs/requirements.txt] file.

    % python setup.py build_sphinx -b html
    % cd build/sphinx/html
    % python3 -m http.server

Then go to http://localhost:8000/.

There is also also a troff man-page for the pybofh script, which can be
built with:

    % python setup.py build_sphinx -b man
    % man ./build/sphinx/man/pybofh.1

For other documentation formats, see [docs/README.md] and [docs/Makefile].


[Cerebrum]: https://github.com/unioslo/cerebrum
[docs/Makefile]: https://github.com/unioslo/pybofh/blob/master/docs/Makefile
[docs/README.md]: https://github.com/unioslo/pybofh/blob/master/docs/README.md
[docs/requirements.txt]: https://github.com/unioslo/pybofh/blob/master/requirements.txt
[virtualenv]: https://virtualenv.pypa.io/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/unioslo/pybofh",
    "name": "bofh",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "cerebrum bofh xmlrpc client",
    "author": "USIT, University of Oslo",
    "author_email": "bnt-int@usit.uio.no",
    "download_url": "https://files.pythonhosted.org/packages/63/88/e04a4f519f0c701626a191d8bf31ede22fee7698c9d2e7319046a77622f1/bofh-0.9.8.tar.gz",
    "platform": null,
    "description": "bofh\n====\n\n*bofh*, short for *brukerorganisering for hvermannsen*, is a [Cerebrum]\nadministration tool.\n\nIt is an interactive XML/RPC command line client for a\n`Cerebrum.modules.bofhd` server.  It is unlikely you want to use this\nsoftware unless you know what Cerebrum is.\n\n\nInstall\n-------\n\nbofh is implemented in Python and supports Python runtimes 2.7\n(>= 2.7.9, >= RHEL7 2.7.5), and 3.6 or newer.\n\nIf you are on RHEL we recommend that you install the bofh RPM package\nfrom the university package repository:\n\n    # dnf install python3-bofh\n\nOn other systems we recommend installing from the official Python package\nindex (PyPI) into a [virtualenv]:\n\n    % virtualenv ~/venv\n    % source ~/venv/bin/activate\n    (venv) % pip install bofh\n\n\nUse\n---\n\n    pybofh --help\n    python -m bofh --help\n\n\nModule usage\n------------\n\n```python\nimport bofh\nfrom getpass import getuser, getpass\n\n# Get a client by connecting to bofhd\nurl = 'https://example.org:8000'\nclient = bofh.connect(url=url)\n\n# You'll need to authenticate to access restricted commands\nclient.login(getuser(), getpass())\n\n# Call commands on the client object\ntry:\n    # formatted output\n    client.user.info('foo')\n\n    # structured output\n    client.run_command('user_info', 'foo')\nfinally:\n    client.logout()\n```\n\n\nDocumentation\n-------------\n\nYou'll have to build the bofh documentation yourself (for now).\n\nDocumentation is built using *sphinx*, and build requirements are\nspecified in the [docs/requirements.txt] file.\n\n    % python setup.py build_sphinx -b html\n    % cd build/sphinx/html\n    % python3 -m http.server\n\nThen go to http://localhost:8000/.\n\nThere is also also a troff man-page for the pybofh script, which can be\nbuilt with:\n\n    % python setup.py build_sphinx -b man\n    % man ./build/sphinx/man/pybofh.1\n\nFor other documentation formats, see [docs/README.md] and [docs/Makefile].\n\n\n[Cerebrum]: https://github.com/unioslo/cerebrum\n[docs/Makefile]: https://github.com/unioslo/pybofh/blob/master/docs/Makefile\n[docs/README.md]: https://github.com/unioslo/pybofh/blob/master/docs/README.md\n[docs/requirements.txt]: https://github.com/unioslo/pybofh/blob/master/requirements.txt\n[virtualenv]: https://virtualenv.pypa.io/\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Cerebrum bofh client",
    "version": "0.9.8",
    "project_urls": {
        "Homepage": "https://github.com/unioslo/pybofh"
    },
    "split_keywords": [
        "cerebrum",
        "bofh",
        "xmlrpc",
        "client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6388e04a4f519f0c701626a191d8bf31ede22fee7698c9d2e7319046a77622f1",
                "md5": "b1ccb762e5f9c89f12cb311074de658e",
                "sha256": "67bb7cc7a80835c02f7b6616c14ba2c46c2be719b3384956de8c81e733f6c97c"
            },
            "downloads": -1,
            "filename": "bofh-0.9.8.tar.gz",
            "has_sig": false,
            "md5_digest": "b1ccb762e5f9c89f12cb311074de658e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 53836,
            "upload_time": "2023-05-30T14:15:56",
            "upload_time_iso_8601": "2023-05-30T14:15:56.102452Z",
            "url": "https://files.pythonhosted.org/packages/63/88/e04a4f519f0c701626a191d8bf31ede22fee7698c9d2e7319046a77622f1/bofh-0.9.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-30 14:15:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "unioslo",
    "github_project": "pybofh",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "bofh"
}
        
Elapsed time: 0.08462s