Skip to main content

Pure python Perforce API

Project description

Pure python perforce API

Features

  • Pythonic api to Perforce

  • Pure python, no compiled extension

Installation

pip install python-perforce

Usage

>>> from perforce import connection
>>> p4 = connection.Connection()
>>> revisions = p4.ls('//depot/path/to/file.txt')
>>> print(revisions)
[<Revision 1: file.txt>]
>>> p4.ls('//depot/path/....txt')
[<Revision 1: file.txt>, <Revision 2: foo.txt>]
>>> cl = p4.findChangelist('my description')
>>> with cl:
...     cl.append(revisions[0])
...     p4.add('path/to/add.txt', cl)
>>> cl.description
'my description'
>>> cl.description = 'something else'
>>> cl.submit()

History

0.3.7 (2015-1-7)

  • Fixed bugs regarding spaces in file names or specs

  • Fixed bug that may have left too many file handles open

  • Added comparison operator to Changelist

0.3.6 (2015-12-3)

  • Added __iadd_ operator to Changelist

  • Added unchanged_only flag to Changelist.revert()

  • Added exclude_deleted flag to Connection.ls()

  • Fixed a bug on windows that would occur if the command line was too long (>8190)

  • Added setter to Connection.client

  • Changelist.append will now raise a RevisionError if the file to append is not under the clients root

0.3.5 (2015-11-18)

  • Changed the argument order for Revisions to be consistent with everything else. Supports backwards compatible argument orders

  • Fixed bug that would attempt to checkout files when querying a changelist

0.3.4 (2015-11-17)

  • Changed enums to be namedtuples

  • Fixed bug when detecting login state

0.3.3 (2015-11-16)

  • Corrected the way the error levels were being handled

  • Added more documentation

  • Connection will no longer fail if any of the paramter were incorrect, use Connection.status() to check the status of the connection

0.1.0 (2014-10-16)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-perforce-0.3.7.zip (37.0 kB view details)

Uploaded Source

File details

Details for the file python-perforce-0.3.7.zip.

File metadata

  • Download URL: python-perforce-0.3.7.zip
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-perforce-0.3.7.zip
Algorithm Hash digest
SHA256 4abe0c87da46c56e8b5bb932be2d5d56321563da74193d227e0d97d4ca4285ac
MD5 19b81e001ed565faf38976929f187729
BLAKE2b-256 3f32dd7ca9148077b393cf339e8f5cee92f8d357f3288bfc71a2c3e70b087097

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page