Skip to main content

Write to redis as if it was a file

Project description

RedisFile
===============

This is a simple hack to allow the writing to redis as if it was
just file object in python.

Usage
-----

# Import and open up a ne "file"
from redisfile import RedisFile
f = RedisFile("myrediskey")
# Write some lines to the "file"
f.write('hello')
f.writelines('world')
f.writelines('Your
Awesome')
# Read the whole file
print f.read()
# Reading a file from the end shows no data
print f.read()
# seek to the start of the file
f.seek(0)
# Read a single line
print f.readline()
# Read the rest
print f.read()
# "close" will delete all the data
f.close()

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

Installation is simple too::

$ pip install redis-file

Project details


Download files

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

Source Distribution

redis-file-0.0.1.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file redis-file-0.0.1.tar.gz.

File metadata

  • Download URL: redis-file-0.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redis-file-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2d456b84cc8aba867fa82a02c5c8b46541a010e74847d80d28e8911afa977073
MD5 a806eed075b055de8c2422b2f31dce85
BLAKE2b-256 29eed9933dd2225f6faef4488d5737ba9a2e6fcfc023fbe410c0fe527a42089c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page