Skip to main content

A MINI AND EASY TO USE REDIS SERVER

Project description

READPY

  • PROJECT LINK GITHUB

  • PROJECT LINK PYPI

  • A mini redis server written in python using CYPHER-PROTOCOL

  • For many purposes, 4GB 8GB RAM is not enough, we need services like REDIS, or what we RAM/MEMORY servers, this project makes using that task very easy.

COMPATIBLITY

  • READPY works with Linux, OS-X, and Windows (OS INDEPENDENT).

  • Supported on python 3.10 and above

INSTALLATION

Install it using pip.

USAGE

CONFIGURATION

  • For configuration of server and client need a configuration file named readpy_conf.json

CONFIG PARAMETERS

  • RECV_BUFFER and TRANSMISSION_BUFFER are parameters both should have same corresponding value for both server and client configuration.

  • ENCRYPTION_KEY and DECRYPTION_KEY are parameters which ensure encryption of data sent over connection, see CYPHER-PROTOCOL documentation for more information.

  • TIMEOUT is the time after which a connection is closed or reset from client side or server side.

  • READPY_NODE defines the interface address at which the server will be running (IP).

  • READPY_PORT defines port number on which server runs.

  • Example readpy_conf is given in CONF_FILES folder, consider that for more details.

CLIENT USAGE

  • Put the readpy_conf.json and TEST_SCRIPT/client.py in same folder and run in same directory space.

  • Consider the following code :

from READPY.CLIENT.client import READPY_CLIENT

if __name__ == "__main__" :
	# INITIALISING THE READPY_CLIENT
	CLIENT = READPY_CLIENT()

	# WRITING THE DATA {"VAR1": "Hello from VAR1"} ON LOCATION ["CONSTANTS"] IN SERVER
	print(CLIENT.write(["CONSTANTS"], {"VAR1": "Hello from VAR1"}))

	# WRITING THE DATA {"PI": 3.14} ON LOCATION ["CONSTANTS", "MATH"] IN SERVER
	print(CLIENT.write(["CONSTANTS", "MATH"], {"PI": 3.14}))

	# UPDATING THE DATA {"PI": 3.14} TO {"PI": 3.1428} ON LOCATION ["CONSTANTS", "MATH"]
	print(CLIENT.write(["CONSTANTS", "MATH"], {"PI": 3.14}))

	# READING FROM THE LOCATION ["CONSTANTS"] FROM THE SERVER
	print(CLIENT.read(["CONSTANTS"]))

	# READING FROM THE LOCATION ["CONSTANTS", "MATH"] FROM THE SERVER
	print(CLIENT.read(["CONSTANTS", "MATH"]))

SERVER USAGE

  • Put the readpy_conf.json and TEST_SCRIPT/server.py in same folder and run in same directory space.

  • Consider the following code :

from READPY.SERVER.server import READPY_SERVER

if __name__ == "__main__" :
	# INITIALISING THE READPY_SERVER
	SERVER = READPY_SERVER()
	# STARTING THE SERVER
	SERVER.start_node()
	input()
	# STOPPING THE SERVER AS SOON AS FILE INPUT FACES NEWLINE CHARACTER
	SERVER.stop_node()

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

readpy_P-Y-R-O-B-O-T-1.0.3.tar.gz (42.5 kB view details)

Uploaded Source

Built Distribution

readpy_P_Y_R_O_B_O_T-1.0.3-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file readpy_P-Y-R-O-B-O-T-1.0.3.tar.gz.

File metadata

  • Download URL: readpy_P-Y-R-O-B-O-T-1.0.3.tar.gz
  • Upload date:
  • Size: 42.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for readpy_P-Y-R-O-B-O-T-1.0.3.tar.gz
Algorithm Hash digest
SHA256 33ec324fbde00675a4055bd49afae31c537ad78ef3596bb36789f40970ad1ed0
MD5 e0a57bd38bddd894f27afa5c58d07903
BLAKE2b-256 e92900b94623282bd4056a375bf80f9758cd4105e5266f3bce4ef6c9699f1057

See more details on using hashes here.

File details

Details for the file readpy_P_Y_R_O_B_O_T-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for readpy_P_Y_R_O_B_O_T-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 793d0351b29bfe361843ccfabcec3084cf59ce9e15e4f74abb0d0375e1ab8db0
MD5 b1d5b8fb6c209770d0c87c870512307b
BLAKE2b-256 86b16660d4e1ae2356f9a8c85206047a5a8677ad0061b94a7ff8e6813ef8849f

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