ConnectionPool
Thread-safe connection pool for python
Install
$ pip install connection_pool
Examples
Create a pool
import memcache
from connection_pool import ConnectionPool
# via create function
def create_memcache_client():
return memcache.Client(['127.0.0.1:11211'])
pool = ConnectionPool(create=create_memcache_client,
max_size=10, max_usage=10000, idle=60, ttl=120)
# via lambda
pool = ConnectionPool(create=lambda: memcache.Client(['127.0.0.1:11211']),
max_size=10)
# via functools.partial
from functools import partial
pool = ConnectionPool(create=partial(memcache.Client, ['127.0.0.1:11211']),
max_size=10)
# using a connection
with pool.item() as memcache:
memcache.set('foo', 'bar')
License
The MIT License (MIT). Please see License File for more information.
Metadata
Release files for connection_pool 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| connection_pool-0.0.3.tar.gz | 3.8 kB | Without provenance | Details |
Release files / connection_pool-0.0.3.tar.gz
| Download URL | connection_pool-0.0.3.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf429e7aef65921c69b4ed48f3d48d3eac1383b05d2df91884705842d974d0dc
|
|
BLAKE2b-256 checksum How to use checksums |
bddfc9b4e25dce00f6349fd28aadba7b6c3f7431cc8bd4308a158fbe57b6a22e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for connection_pool 0.0.3
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.