Riakcached
A Memcached like interface to the Riak HTTP Client. Read The Docs
Installing
From PyPI
pip install riakcached
From Git
git clone git://github.com/brettlangdon/riakcached.git
cd ./riakcached
pip install -r requirements.txt
python setup.py install
Usage
Basic Usage
from riakcached.clients import RiakClient
client = RiakClient("my_bucket")
client.set("hello", "world")
print client.get("hello")
# 'hello'
client.delete("hello")
print client.get("hello")
# None
values = {
"hello": "world",
"foo": "bar",
}
client.set_many(values)
keys = ["hello", "foo", "test"]
print client.get_many(keys)
# {'foo': 'bar', 'hello': 'world'}
client.close()
Connection Pool Settings
from riakcached.clients import RiakClient
from riakcached.pools import Urllib3Pool
pool = Urllib3Pool(base_url="http://my-host.com:8098/", timeout=1)
client = RiakClient("my_bucket", pool=pool)
client.get("foo")
Custom Connection Pool
from riakcached.clients import RiakClient
from riakcache.pools import Pool
class CustomPool(Pool):
__slots__ = ["connection"]
def connect(self):
self.connection = make_a_connection()
def close(self):
if self.connection:
close_connection(self.connection)
def request(self, method, url, body=None, headers=None):
results = make_request(self.connection, method, url, body, headers, timeout=self.timeout)
return results.status, results.data, results.headers
custom_pool = CustomPool(base_url="http://my-host.com:8098", timeout=1)
client = RiakClient("my_bucket", pool=pool)
Threaded Client
The exists a riakcached.clients.ThreadedRiakClient which inherits from riakcached.clients.RiakClient and which uses threading to try to parallelize calls to get_many, set_many and delete_many.
Documentation
The documentation can be found in the /docs directory in this repository and should be fairly complete for the codebase.
Building Documentation
git clone git://github.com/brettlangdon/riakcached.git
cd riakcached
pip install -r docs-requirements.txt
cd ./docs
make html
Metadata
Release files for riakcached 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| riakcached-0.1.0.zip | 10.7 kB | Without provenance | Details for riakcached-0.1.0.zip | |
| riakcached-0.1.0.tar.gz | 6.9 kB | Without provenance | Details for riakcached-0.1.0.tar.gz |
Release files / riakcached-0.1.0.zip
| Download URL | riakcached-0.1.0.zip |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe8585f384afa1878d616da1b7d8ef8f4eac27e49a1025b01a4e1b6e2fe5b9fb
|
|
BLAKE2b-256 checksum How to use checksums |
3db2b76c74e87f419a7708de2af76dd7c37dfec006b40cd82b0feba6862b4040
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / riakcached-0.1.0.tar.gz
| Download URL | riakcached-0.1.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6cbe0a770bb7d58b8c3abdf6ba7e0e0df1da76010c7611081017b63a0a2bbd6
|
|
BLAKE2b-256 checksum How to use checksums |
7b8aa9ca27fd8a118861a67bc80adfa3f63fe7650a4c950039662acb0e3bd147
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for riakcached 0.1.0
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.