File: README.rst

package info (click to toggle)
python-phabricator 0.9.1-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 188 kB
  • sloc: python: 453; makefile: 7; sh: 3
file content (42 lines) | stat: -rw-r--r-- 1,080 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
python-phabricator
==================

.. image:: https://travis-ci.org/disqus/python-phabricator.png?branch=master
    :target: https://travis-ci.org/disqus/python-phabricator

Installation
------------

::

    $ pip install phabricator

Usage
-----

Use the API by instantiating it, and then calling the method through dotted notation chaining::

    from phabricator import Phabricator
    phab = Phabricator()  # This will use your ~/.arcrc file
    phab.user.whoami()

You can also use::

    phab = Phabricator(host='https://my-phabricator.org/api/', token='api-mytoken')
    
Parameters are passed as keyword arguments to the resource call::

    phab.user.find(aliases=["sugarc0de"])

Documentation on all methods is located at https://secure.phabricator.com/conduit/

Interface out-of-date
---------------------

If Phabricator modifies Conduit and the included ``interfaces.json`` is out-of-date or to make sure
to always have the latest interfaces::

    from phabricator import Phabricator
    phab = Phabricator()
    phab.update_interfaces()
    phab.user.whoami()