Farama Notifications

0.0.4 · active · verified Thu Apr 09

Farama-Notifications is a Python library that enables providing notifications on import to all Farama Foundation maintained packages. Its primary role is to serve as a unified mechanism for Farama projects to deliver runtime and deprecation notices consistently. The current version is 0.0.4.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the `farama_notifications` library and interact with its `notifications` object. Farama libraries typically populate this object with messages upon import or during runtime.

import farama_notifications

# Example of how a notification might be set or retrieved
# In a typical use case, another Farama library would set these notifications.
NOTIFICATION_ID = 'example_event'
NOTIFICATION_MESSAGE = 'A test event has occurred!'

# Set a notification
farama_notifications.notifications[NOTIFICATION_ID] = NOTIFICATION_MESSAGE

# Retrieve and print all notifications
print('Current Farama Notifications:')
for key, value in farama_notifications.notifications.items():
    print(f'- {key}: {value}')

# Example of checking for a specific notification
if 'example_event' in farama_notifications.notifications:
    print(f"Found 'example_event': {farama_notifications.notifications['example_event']}")

view raw JSON →