
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
In a nutshell Python Database Watcher Library
is a small library with a set of utilities to help you to monitor and watch the database changes.
> pip install databases_watcher
Supported modes:
redis://[[user]:[password]]@host:port/?db=[INT]&queue=[STRING]
redis+pubsub://[[user]:[password]]@host:port/?db=[INT]&channel=[STRING]
redis+watch://[[user]:[password]]@host:port/?db=[INT]&queue=[STRING]
TODO: improve watch mode
from databases_watcher import connect_database
def main():
redis_watch = connect_database("redis://localhost:6501/?db=0&queue=default")
redis_watch.send_message("hello!")
redis_watch.send_json_message({"message": "hello!"})
print(next(redis_watch.read_messages()))
print(next(redis_watch.read_json_messages()))
if __name__ == '__main__':
main()
import asyncio
from databases_watcher import connect_database_async
async def main():
redis_watch = await connect_database_async("redis://localhost:6501/?db=0&queue=default")
await redis_watch.send_message("hello!")
await redis_watch.send_json_message({"message": "hello!"})
async for message in redis_watch.read_messages():
print(message)
break
async for message in redis_watch.read_json_messages():
print(message)
break
if __name__ == '__main__':
asyncio.run(main())
import time
import threading
from databases_watcher import connect_database
CONNECTION_STRING = "redis+pubsub://localhost:6501/?db=0&channel=default"
def background_read_pubsub():
redis_watch = connect_database(CONNECTION_STRING)
print(next(redis_watch.read_messages()))
print(next(redis_watch.read_json_messages()))
def main():
redis_watch = connect_database(CONNECTION_STRING)
t = threading.Thread(target=background_read_pubsub)
t.start()
time.sleep(2)
redis_watch.send_message("hello!")
redis_watch.send_json_message({"message": "hello!"})
t.join()
if __name__ == '__main__':
main()
import asyncio
from databases_watcher import connect_database_async
CONNECTION_STRING = "redis+pubsub://localhost:6501/?db=0&channel=default"
async def background_read_pubsub():
redis_watch = await connect_database_async(CONNECTION_STRING)
async for message in redis_watch.read_messages():
print(message)
break
async for message in redis_watch.read_json_messages():
print(message)
break
async def main():
redis_watch = await connect_database_async(CONNECTION_STRING)
asyncio.create_task(background_read_pubsub())
await asyncio.sleep(2)
await redis_watch.send_message("hello!")
await redis_watch.send_json_message({"message": "hello!"})
if __name__ == '__main__':
asyncio.run(main())
Dictionary Search is Open Source and available under the MIT.
Contributions are very welcome. See CONTRIBUTING.md or skim existing tickets to see where you could help out.
FAQs
Multi database watcher for changes on them
We found that databases-watcher demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.