Skip to main content

An async extension to p4python

Project description

p4async

An extension to the p4python module, adding async functionality to Perforce.

Setup

Use your favorite package manager to install the module into your project

  • pip install p4async
  • uv add p4async

Usage

from p4async import P4Async
p4a = P4Async()
await p4a.aconnect()

All relevant Perforce commands have async counterparts prefixed with a. For example: aconnect(), arun(), arun_clients(), afetch_change(), etc.

Commands are executed with a lock on a worker thread. The way this is done can be customized via subclassing.

Caveats

It would appear that current versions of p4python do not release the pythong GIL (global interpreter lock) while doing a connect() call. This means that even aconnect() is currently blocking. This might get fixed by Perforce at some point.

Development

  • Use uv for dependency management and virtual environments.

License

MIT

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

p4async-0.1.6.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

p4async-0.1.6-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file p4async-0.1.6.tar.gz.

File metadata

  • Download URL: p4async-0.1.6.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.22

File hashes

Hashes for p4async-0.1.6.tar.gz
Algorithm Hash digest
SHA256 67d94741c5a6fe445c503b5c25b698d281bc5afc1fd64f3ba5024cc8407c999a
MD5 9f41785101b6564d1dc9093f51ae2dd9
BLAKE2b-256 c75d237c39f4546484b3f499f2e2daf240302da929061489040d26d2b9182046

See more details on using hashes here.

File details

Details for the file p4async-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: p4async-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.22

File hashes

Hashes for p4async-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3862df43e415d745d18b396fbdc0d4b2039f77b9f69e6c6205aeab7edf92dd35
MD5 305fd892b21c58dc5a6f8dbc33be690e
BLAKE2b-256 afd14d4fdd3b34cfdaddf70a08684f484a81ebfdafa5db09fb89e107c4ca09df

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