Package Search Help

You can use boolean logic (e.g. AND/OR/NOT) for complex search queries. For more help and examples, see the search documentation.

Search by package name:
my-package (implicit)
name:my-package (explicit)

Search by package filename:
my-package.ext (implicit)
filename:my-package.ext (explicit)

Search by package tag:
latest (implicit)
tag:latest (explicit)

Search by package version:
1.0.0 (implicit)
version:1.0.0 (explicit)
prerelease:true (prereleases)
prerelease:false (no prereleases)

Search by package architecture:
architecture:x86_64 

Search by package distribution:
distribution:el 

Search by package license:
license:MIT 

Search by package format:
format:deb 

Search by package status:
status:in_progress 

Search by package file checksum:
checksum:5afba 

Search by package security status:
severity:critical 

Search by package vulnerabilities:
vulnerabilities:>1 
vulnerabilities:<1000 

Search by # of package downloads:
downloads:>8 
downloads:<100 

Search by package type:
type:binary 
type:source 

Search by package size (bytes):
size:>50000 
size:<10000 

Search by dependency name/version:
dependency:log4j 
dependency:log4j=1.0.0 
dependency:log4j>1.0.0 

Search by uploaded date:
uploaded:>"1 day ago" 
uploaded:<"August 14, 2022 EST" 

Search by entitlement token (identifier):
entitlement:3lKPVJPosCsY 

Search by policy violation:
policy_violated:true
deny_policy_violated:true
license_policy_violated:true
vulnerability_policy_violated:true

Search by repository:
repository:repo-name

Search queries for all Debian-specific (and related) package types

Search by component:
deb_component:unstable

Search queries for all Maven-specific (and related) package types

Search by group ID:
maven_group_id:org.apache

Search queries for all Docker-specific (and related) package types

Search by image digest:
docker_image_digest:sha256:7c5..6d4
(full hashref only)

Search by layer digest:
docker_layer_digest:sha256:4c4..ae4
(full hashref only)

Field type modifiers (depending on the type, you can influence behaviour)

For all queries, you can use:
~foo for negation

For string queries, you can use:
^foo to anchor to start of term
foo$ to anchor to end of term
foo*bar for fuzzy matching

For number/date or version queries, you can use:
>foo for values greater than
>=foo for values greater / equal
<foo for values less than
<=foo for values less / equal

Need a secure and centralised artifact repository to deliver Alpine, Cargo, CocoaPods, Composer, Conan, Conda, CRAN, Dart, Debian, Docker, Go, Helm, Hex, LuaRocks, Maven, npm, NuGet, P2, Python, RedHat, Ruby, Swift, Terraform, Vagrant, Raw & More packages?

Cloudsmith is the new standard in Package / Artifact Management and Software Distribution.

With support for all major package formats, you can trust us to manage your software supply chain.

Start My Free Trial
 Public agriconnect agriconnect (AgriConnect) / python
Prebuilt wheel for Python packages

Python logo hiredis  0.3.0

One-liner (summary)

Python wrapper for hiredis

Description

# hiredis-py

[![Build Status](https://travis-ci.org/redis/hiredis-py.svg?branch=master)](https://travis-ci.org/redis/hiredis-py) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/muso9gbe316tjsac/branch/master?svg=true)](https://ci.appveyor.com/project/duyue/hiredis-py/)

Python extension that wraps protocol parsing code in [hiredis][hiredis]. It primarily speeds up parsing of multi bulk replies.

[hiredis]: http://github.com/redis/hiredis

## Install

hiredis-py is available on [PyPi](http://pypi.python.org/pypi/hiredis), and can be installed with:

` easy_install hiredis `

### Requirements

hiredis-py requires Python 2.6 or higher.

Make sure Python development headers are available when installing hiredis-py. On Ubuntu/Debian systems, install them with apt-get install python-dev for Python 2 or apt-get install python3-dev for Python 3.

## Usage

The hiredis module contains the Reader class. This class is responsible for parsing replies from the stream of data that is read from a Redis connection. It does not contain functionality to handle I/O.

### Reply parser

The Reader class has two methods that are used when parsing replies from a stream of data. Reader.feed takes a string argument that is appended to the internal buffer. Reader.gets reads this buffer and returns a reply when the buffer contains a full reply. If a single call to feed contains multiple replies, gets should be called multiple times to extract all replies.

Example:

`python >>> reader = hiredis.Reader() >>> reader.feed("$5\r\nhello\r\n") >>> reader.gets() 'hello' `

When the buffer does not contain a full reply, gets returns False. This means extra data is needed and feed should be called again before calling gets again:

`python >>> reader.feed("*2\r\n$5\r\nhello\r\n") >>> reader.gets() False >>> reader.feed("$5\r\nworld\r\n") >>> reader.gets() ['hello', 'world'] `

#### Unicode

hiredis.Reader is able to decode bulk data to any encoding Python supports. To do so, specify the encoding you want to use for decoding replies when initializing it:

`python >>> reader = hiredis.Reader(encoding="utf-8") >>> reader.feed("$3\r\n\xe2\x98\x83\r\n") >>> reader.gets() u'☃' `

When bulk data in a reply could not be properly decoded using the specified encoding, it will be returned as a plain string. When the encoding cannot be found, a LookupError will be raised after calling gets for the first reply with bulk data (identical to what Python's unicode method would do).

#### Error handling

When a protocol error occurs (because of multiple threads using the same socket, or some other condition that causes a corrupt stream), the error hiredis.ProtocolError is raised. Because the buffer is read in a lazy fashion, it will only be raised when gets is called and the first reply in the buffer contains an error. There is no way to recover from a faulty protocol state, so when this happens, the I/O code feeding data to Reader should probably reconnect.

Redis can reply with error replies (-ERR ...). For these replies, the custom error class hiredis.ReplyError is returned, but not raised.

When other error types should be used (so existing code doesn't have to change its except clauses), Reader can be initialized with the protocolError and replyError keywords. These keywords should contain a class that is a subclass of Exception. When not provided, Reader will use the default error types.

## Benchmarks

The repository contains a benchmarking script in the benchmark directory, which uses [gevent](http://gevent.org/) to have non-blocking I/O and redis-py to handle connections. These benchmarks are done with a patched version of redis-py that uses hiredis-py when it is available.

All benchmarks are done with 10 concurrent connections.

  • SET key value + GET key * redis-py: 11.76 Kops * redis-py with hiredis-py: 13.40 Kops * improvement: 1.1x

List entries in the following tests are 5 bytes.

  • LRANGE list 0 9: * redis-py: 4.78 Kops * redis-py *wit

Size

52.6 KB

Downloads

73

Tags

bdist/wheel whl linux_armv7l cp36 cp36m

Status  Completed
Checksum (MD5) 60f07c092c99c93e3477c30696fe07eb
Checksum (SHA-1) c41ba796428cbfbd1f04d367e6d2718ed8ec6303
Checksum (SHA-256) 162f44c496bd9b8d7a0f84ccd22708fad284d7ce6983f8dc5568f805d8d4199e
Checksum (SHA-512) fadad213b4a1fc325f477a60f4b45d315c8d0eac95bab40eeb4c2648c7cfefa2ad…
GPG Signature
Storage Region  Dublin, Ireland
Type  Binary (contains binaries and binary artifacts)
Uploaded At 5 years, 6 months ago
Uploaded By quan
Slug Id hiredis-030-cp36-cp36m-linux_armv7lwhl
Unique Id olvIOaMRkAg3
Version (Raw) 0.3.0
Version (Parsed)
  • Major: 0
  • Minor: 3
  • Patch: 0
  • Type: SemVer (Strict)
  extended metadata
Abi cp36m
Author Jan-Erik Rediger, Pieter Noordhuis <janerik@fnordig.de>
Classifiers Development Status :: 5 - Production/Stable | Intended Audience :: Developers | License :: OSI Approved :: BSD License | Operating System :: MacOS | Operating System :: POSIX | Programming Language :: C | Programming Language :: Python :: 2 | Programming Language :: Python :: 2.6 | Programming Language :: Python :: 2.7 | Programming Language :: Python :: 3 | Programming Language :: Python :: 3.2 | Programming Language :: Python :: 3.3 | Programming Language :: Python :: 3.4 | Programming Language :: Python :: 3.5 | Programming Language :: Python :: 3.6 | Programming Language :: Python :: 3.7 | Programming Language :: Python :: Implementation :: CPython | Topic :: Software Development
Homepage URL https://github.com/redis/hiredis-py
Keywords Redis
Metadata Version 2.1
Py Filetype bdist_wheel
Py Version cp36
pkg hiredis-0.3.0-cp36-cp36m-linux_… 73
52.6 KB
md5 sha1 sha256 sha512
Package Contents (hiredis-0.3.0-cp36-cp36m-linux_armv7l.whl)
Loading...

This package has 11 files/directories.

Security Scanning:
You can't see this because your subscription doesn't include this feature, sorry!

With Security Scanning, Cloudsmith will scan your artifacts for vulnerabilities when they're uploaded. These are then presented to you via the UI and the API, so that you can build rules into your CI/CD pipelines to decide how to handle low, medium, high and critical software vulnerabilities.

If you'd like to trial or ask about the Security Scanning feature, just ask us. We'll be happy to help!

Last scanned

11 hours ago

Scan result

Vulnerable

Vulnerability count

5

Max. severity

Low
Target:
LOW

CVE-2977-52329: library: vulnerability title



Package Name: package_name
Installed Version: 1.3.99
Fixed Version: 2.5.76

References: trujillo-reeves.com bell.com www.conley-brown.info
LOW

CVE-7043-12982: library: vulnerability title



Package Name: package_name
Installed Version: 1.7.3
Fixed Version: 2.8.91

References: www.jackson-richard.biz www.peterson-davis.com fuller.biz
LOW

CVE-5363-14988: library: vulnerability title



Package Name: package_name
Installed Version: 1.6.52
Fixed Version: 2.7.6

References: www.lopez.com rocha-brady.info www.harris-leonard.com
LOW

CVE-7273-69560: library: vulnerability title



Package Name: package_name
Installed Version: 1.3.49
Fixed Version: 2.4.75

References: www.ramirez-burton.com gray.com www.williams.info
LOW

CVE-2045-56556: library: vulnerability title



Package Name: package_name
Installed Version: 1.3.76
Fixed Version: 2.4.15

References: chapman-mcclure.com www.ho.com www.cooper.com

You can embed a badge in another website that shows this or the latest version of this package.

To embed the badge for this specific package version, use the following:

[![This version of 'hiredis' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/hiredis/0.3.0/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/?render=true)](https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/hiredis/0.3.0/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/)
|This version of 'hiredis' @ Cloudsmith|
.. |This version of 'hiredis' @ Cloudsmith| image:: https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/hiredis/0.3.0/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/?render=true
   :target: https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/hiredis/0.3.0/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/
image::https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/hiredis/0.3.0/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/?render=true[link="https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/hiredis/0.3.0/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/",title="This version of 'hiredis' @ Cloudsmith"]
<a href="https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/hiredis/0.3.0/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/hiredis/0.3.0/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/?render=true" alt="This version of 'hiredis' @ Cloudsmith" /></a>

rendered as: This version of 'hiredis' @ Cloudsmith

To embed the badge for the latest package version, use the following:

[![Latest version of 'hiredis' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/hiredis/latest/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/?render=true&show_latest=true)](https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/hiredis/latest/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/)
|Latest version of 'hiredis' @ Cloudsmith|
.. |Latest version of 'hiredis' @ Cloudsmith| image:: https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/hiredis/latest/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/?render=true&show_latest=true
   :target: https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/hiredis/latest/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/
image::https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/hiredis/latest/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/?render=true&show_latest=true[link="https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/hiredis/latest/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/",title="Latest version of 'hiredis' @ Cloudsmith"]
<a href="https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/hiredis/latest/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/hiredis/latest/a=linux_armv7l;xa=cp36m;xf=bdist_wheel;xn=hiredis;xv=cp36/?render=true&show_latest=true" alt="Latest version of 'hiredis' @ Cloudsmith" /></a>

rendered as: Latest version of 'hiredis' @ Cloudsmith

These instructions assume you have setup the repository first (or read it).

To install/use hiredis @ version 0.3.0 ...

pip install 'hiredis==0.3.0'

You can also install the latest version of this package:

pip install --upgrade 'hiredis'

If necessary, you can specify the repository directly:

pip install \
  --index-url=https://dl.cloudsmith.io/public/agriconnect/python/python/simple/ \
  hiredis==0.3.0

If you've got a project requirements.txt file, you can specify this as a dependency:

--index-url=https://dl.cloudsmith.io/public/agriconnect/python/python/simple/
hiredis==0.3.0

In addition, you can use this repository as an extra index url. However, please read our documentation on this parameter before using it. For example in a requirements.txt file:

--extra-index-url=https://dl.cloudsmith.io/public/agriconnect/python/python/simple/
hiredis==0.3.0
Warning: We highly recommend using pip (or similar) rather than installing directly.
Previous Version
Top