Skip to main content
SanicRedis
==============
Redis support for sanic.

Built on top of [aioredis](https://github.com/aio-libs/aioredis).

Installation
------------

You can install this package as usual with pip:

pip install SanicRedis

Example

```python
from sanic import Sanic
from sanic.response import json
from SanicRedis import BaseRedis

app = Sanic(__name__)
redisdb = dict(redisdb=8, redishost='localhost', redisport=6379, redispwd='password')

app.config.update(redisdb)
BaseRedis.init_app(app)


# group key of redis
class GroupKey(BaseRedis):
__coll__ = 'GroupKey_' # GroupKey + key


@app.route('/test1')
async def test1(request):
await GroupKey.set('testkey', 'value') # key is GroupKey_testkey
result = await GroupKey.get('testkey') # get value of GroupKey_testkey
return json(result)


if __name__ == '__main__':
app.run(debug=True)
```

Resources
---------

- [PyPI](https://pypi.org/project/SanicRedis)

Metadata

Release files for SanicRedis 0.1.2

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

Source distribution (sdist)

Source distribution for SanicRedis 0.1.2
File Size Uploaded Provenance Actions
SanicRedis-0.1.2.tar.gz 5.9 kB Without provenance Details for SanicRedis-0.1.2.tar.gz

Release files / SanicRedis-0.1.2.tar.gz

Download URL SanicRedis-0.1.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ac781facad5cba182d385af075f0a6b7b56e90a1cd1600a38d43ae4bd7ac2769
BLAKE2b-256 checksum
How to use checksums
6c77ccb6c5f6d9c8288fc4815487515af149902ddfb91d57629fa81c0f194aed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.7.0 setuptools/24.0.2 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.10

Security for SanicRedis 0.1.2

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.

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