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.5.tar.gz (16.3 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.5-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for p4async-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6cc80ad4df48a8b23e27095dfe39de46604010c6f163602b588adac14b7a9fd7
MD5 9a1ba64ba387d106a1a23f086f5a377f
BLAKE2b-256 21f76d05a645630203627b5e8ce5b1db220678edf47d19c223df489dfa9414b2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for p4async-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4376ac939b2f1b09aedd4ad62312e66812a66dbc504710fa99eaf0691bbd6b28
MD5 f378cd8ef2387f36fd2588262bbb7583
BLAKE2b-256 3f82d35742fd51ce035eaec9d133f96939498e64a8bbe9f03f16387b2e5561cc

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