====================================
`p4py` - Pure Python Perforce Client
====================================
:Author: Miki Tebeka <mtebeka@qualcomm.com>
:Version: 0.1.0
.. contents:: Table of Contents
Prefrace
========
`p4py` is a pure Python_ Perforce_ client, it is designed to be API compatible
for Robert Cowham's P4Python_.
`p4py` also provides some higher level function for manipulation Perforce.
Usage
=====
Example
-------
::
from p4py impor P4
p4 = P4()
p4.port = "1666"
p4.user = "me"
p4.client = "my-client"
client = p4.fetch_client()
client["Root"] = r"C:\Temp\my-client"
p4.save_client(client)
API
===
Have a look at P4Python_ API
Compatibility Issues
--------------------
`p4py` uses Perforce client ability to return marshaled Python objects. This
means that all returned objects are Python dictionaries [#]_.
Void Commands
~~~~~~~~~~~~~
connect
Will always return 1
disconnect
Will always return 1
dorpped
Will always return 0
parse_forms
Will always return 1
Unimplemented Commands
~~~~~~~~~~~~~~~~~~~~~~
The following commands will raise `NotImplementedError`
* tagged
* translate
* login
* passwd
High Level Functions
--------------------
`new_label(p4, name, path, description, revision="")`
Create a new label and populate it with files from `path`
`new_change(p4, description="")`
Create new change list, return change list number
`new_client(p4, name, root, mapping, description="")`
Create a new client
`new_branch(p4, name, source, dest, description="")`
Create new branch
License
=======
BSD_ (see `LICENSE.txt`_)
------------
.. [#] Same as running `p4.parse_forms()` in P4Python_
.. _Python: http://www.python.org
.. _Perforce: http://www.perforce.com
.. _P4Python: http://public.perforce.com/guest/robert_cowham/perforce/API/python/index.html
.. _BSD: http://www.opensource.org/licenses/bsd-license.php
.. _LICENSE.txt: LICENSE.txt
.. comment: vim:ft=rst spell