Skip to main content

Threaded Proxy Object

pip install threadproxyobject

Tested against Windows 10 / Python 3.11 / Anaconda

import pandas as pd
import random
from time import sleep
from threadedproxyobject import ThreadedProxyObject, ThreadedProxyObjectMultiExecute


def funct(x, y):
    return random.randint(x, y)


def funct2(x, y):
    return [x + y]


def funct3(x, y):
    while True:
        print(random.randint(x, y))
        sleep(1)


test = ThreadedProxyObject(funct, args=(1, 200))
test.start()
print(test)
sleep(1)
print((test) ** 10)

test2 = ThreadedProxyObject(funct2, args=(1, 200))
test2.start()
print((test2))
sleep(1)
test2.append(3)
print(test2)

test3 = ThreadedProxyObjectMultiExecute(fu=funct, args=(1, 200))
test3()
print((test3))
sleep(1)
print(test3 / 10)

test4 = ThreadedProxyObjectMultiExecute(fu=funct2, args=(1, 200))
test4()
sleep(1)
print(test4 * 10)

test5 = ThreadedProxyObjectMultiExecute(fu=funct3, args=(1, 200))
test5()
print((test5))
test5.kill()
test6 = ThreadedProxyObjectMultiExecute(fu=funct, daemon=False, args=(1, 200))
test6.start_timer_call(3)
sleep(4)
print((test6))
print(test6 + 10)
test6.stop_timer_call()


liste = [
    ThreadedProxyObjectMultiExecute(
        fu=funct, daemon=True, args=(1, 200)
    ).start_timer_call(3)
    for x in range(100)
]
sleep(2)
df = pd.DataFrame(liste)
print(df[0] * 2)

# 45
# 34050628916015625
# [201]
# [201, 3]
# 129
# 12.9
# [201, 201, 201, 201, 201, 201, 201, 201, 201, 201]
# 141
# N/A
# 151
# 161
# 0     128
# 1     314
# 2     220
# 3     102
# 4     220
#      ... 
# 95     72
# 96    314
# 97     24
# 98    144
# 99     24
# Name: 0, Length: 100, dtype: object

Metadata

Release files for threadedproxyobject 0.10

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

Source distribution (sdist)

Source distribution for threadedproxyobject 0.10
File Size Uploaded Provenance Actions
threadedproxyobject-0.10.tar.gz 6.6 kB Without provenance Details for threadedproxyobject-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for threadedproxyobject 0.10
File Interpreter ABI Platform Actions
threadedproxyobject-0.10-py3-none-any.whl Python 3 none any Details for threadedproxyobject-0.10-py3-none-any.whl

Total release size: 13.2 kB

Release files / threadedproxyobject-0.10.tar.gz

Download URL threadedproxyobject-0.10.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
930fa60fd67de866d25f138af23e777c6949fb073d6b2362714207c903f3b0fc
BLAKE2b-256 checksum
How to use checksums
c72af5bbd842f0c14265a605b44e4e39879f6776b07818e2f9e24c1a4afc5922
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / threadedproxyobject-0.10-py3-none-any.whl

Download URL threadedproxyobject-0.10-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f9f246339fc0679eea41796933b7a61cd40b2cb2f6f81a734c575aa6420cd89
BLAKE2b-256 checksum
How to use checksums
8bb7ff599ca4014b002edee4786c0022c215c33cb2051a29493bb942d8516f97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for threadedproxyobject 0.10

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.10 This release

2 release files 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