skillfed

p4python

P4Python - Python interface to Perforce API

p4python v2026.1.3027817 322.2K downloads/30d#7,615 on PyPI
License unclear LICENSE.txt Active released

What it is and what it does

p4python is a Python binding to the Perforce C++ API, enabling developers to programmatically interact with Perforce version control systems. It wraps the native Perforce libraries to provide direct access to Perforce operations from Python code with performance comparable to native tools.

The package is distributed as precompiled wheels for multiple platforms and Python versions, reducing installation complexity. It has no runtime dependencies beyond the Perforce client libraries themselves, making it lightweight for integration into larger systems. The package is actively maintained and has been in production use since its initial release in 2015.

Use it for:

  • Automate Perforce workflows and change management in CI/CD pipelines.
  • Build custom tools to query Perforce metadata, changelists, and file history.
  • Integrate Perforce operations into Python-based build or deployment systems.
  • Programmatically manage file submissions and version control operations.
  • Create monitoring or reporting tools that pull data from a Perforce server.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

p4python wraps the Perforce C++ API to provide a Python interface for interacting with Perforce version control systems, prioritizing performance and ease of use.

Yes, if you need to interact with Perforce from Python. The package is actively maintained, has no known vulnerabilities, and offers prebuilt wheels for common platforms. However, verify that the LICENSE.txt terms are compatible with your project, and confirm your Perforce server version is supported before deploying to production.

Install

p4python on PyPI

pip

pip install p4python

uv

uv add p4python

poetry

poetry add p4python

Installing p4python

Before you install

Medium install friction due to compiled wheels; however, prebuilt binaries are available for common platforms (macOS, Windows, Linux) and multiple Python versions, and the package is actively maintained with a recent release.

License in practice

License treatment is marked unclear; the package references LICENSE.txt but provides no SPDX identifier. Review the LICENSE.txt file before use to confirm compatibility with your project's licensing requirements.

Quickstart

pip install p4python

import p4python
# Connect to Perforce server and execute commands

Requires a Perforce server to connect to; the Perforce client libraries must be compatible with your server version.

Verify before relying

  • Which Python versions are actually supported (requires_python is unspecified despite wheels for 3.10–3.13).
  • Specific Perforce server version compatibility and minimum requirements.
  • Whether the LICENSE.txt file is proprietary, permissive, or restrictive.
  • Actual API surface and command coverage available through the wrapper.

Package facts

License LICENSE.txt (unclear)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 15 days since the last release
First released
Downloads 322,177/month — #7,615 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: p4python-2026.1.3027817-cp310-cp310-macosx_10_15_x86_64.whl; p4python-2026.1.3027817-cp310-cp310-macosx_11_0_arm64.whl; p4python-2026.1.3027817-cp310-cp310-manylinux_2_28_aarch64.whl; p4python-2026.1.3027817-cp310-cp310-manylinux_2_28_x86_64.whl; p4python-2026.1.3027817-cp310-cp310-win32.whl; p4python-2026.1.3027817-cp310-cp310-win_amd64.whl; p4python-2026.1.3027817-cp311-cp311-macosx_10_15_x86_64.whl; p4python-2026.1.3027817-cp311-cp311-macosx_11_0_arm64.whl; p4python-2026.1.3027817-cp311-cp311-manylinux_2_28_aarch64.whl; p4python-2026.1.3027817-cp311-cp311-manylinux_2_28_x86_64.whl; p4python-2026.1.3027817-cp311-cp311-win32.whl; p4python-2026.1.3027817-cp311-cp311-win_amd64.whl; p4python-2026.1.3027817-cp312-cp312-macosx_10_15_x86_64.whl; p4python-2026.1.3027817-cp312-cp312-macosx_11_0_arm64.whl; p4python-2026.1.3027817-cp312-cp312-manylinux_2_28_aarch64.whl; p4python-2026.1.3027817-cp312-cp312-manylinux_2_28_x86_64.whl; p4python-2026.1.3027817-cp312-cp312-win32.whl; p4python-2026.1.3027817-cp312-cp312-win_amd64.whl; p4python-2026.1.3027817-cp313-cp313-macosx_10_15_x86_64.whl; p4python-2026.1.3027817-cp313-cp313-macosx_11_0_arm64.whl

Keywords: Perforce, perforce, P4Python

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: Freely DistributableOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: PythonTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Version ControlTopic :: Utilities

Tags

perforce python clientp4 version control apiperforce scm integrationpython perforce wrapperp4 api python binding
version-controlperforcescm-integration

More Software Development packages