Skip to main content

python-snappy

Pure Python Snappy compression and decompression library.

Features

  • Pure Python implementation - no C dependencies required
  • Full compression and decompression support
  • Supports all Snappy element types: literals and copy operations
  • Handles 1-byte, 2-byte, and 4-byte offset copies

Installation

uv add python-snappy-pure

Or with pip:

pip install python-snappy-pure

Usage

from python_snappy import compress, decompress

# Compress data
data = b"Hello, World!" * 100
compressed = compress(data)

# Decompress data
decompressed = decompress(compressed)
assert decompressed == data

Limitations

  • Performance is slower than C-based implementations

For production use with large data, consider using the python-snappy package from PyPI which wraps the C library.

Development

uv sync --extra test
uv run pytest

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_snappy_pure-0.2.0.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_snappy_pure-0.2.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file python_snappy_pure-0.2.0.tar.gz.

File metadata

  • Download URL: python_snappy_pure-0.2.0.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for python_snappy_pure-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f14a66ea83b5db2fcabdfab7e2a5b22d700e78232e72589b92521f8255f0659c
MD5 dff0101d51b7790a6b62e0c638767b72
BLAKE2b-256 427153adad322c3e66b3f6811964b4b85e938288015032fbf7b5699a92064cd3

See more details on using hashes here.

File details

Details for the file python_snappy_pure-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: python_snappy_pure-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for python_snappy_pure-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fac98f2af5371b211a50f26537d3ba6d5503d58883d6a684b6f5cd34314ea44
MD5 5e34e2a4183bf2b29c22bc7bfd466fda
BLAKE2b-256 e17760ac75312ba065f783ef3990bc49dc016b4dc0c7af70383a7ca107b00e87

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page