Skip to main content

Run tasks on external processes to overcome Python's global interpreter lock.

Inspired by google-research/batch-ppo ExternalProcess

Installation

pip install external

Usage

import external

@external
class Counter():

    def __init__(self, count=0):
        self.count = count

    def increment(self):
        self.count += 1

with Counter(count=1) as c:
    assert c.count.get() == 1
    c.increment()
    assert c.count.get() == 2
    try:
        c.decrement()
    except AttributeError as e:
        print(e)  # 'Counter' object has no attribute 'decrement'
    assert c.count.get() == 2

Metadata

Release files for external 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for external 0.0.1
File Size Uploaded Provenance Actions
external-0.0.1.tar.gz 2.4 kB Without provenance Details for external-0.0.1.tar.gz

Release files / external-0.0.1.tar.gz

Download URL external-0.0.1.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
79296497a6d404bc39cce7425ccde02f7c6798e09672acde7cfe57ef44b266c8
BLAKE2b-256 checksum
How to use checksums
8dd821c19c68c616cec27f3ea4c36c4516e56e997d862cfacaa4a5bbe46d19e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.20.0 CPython/3.6.4

Security for external 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page