CircularDict is a high-performance Python data structure that blends the functionality of dictionaries and circular buffers. Inheriting the usage of traditional dictionaries, it allows you to define constraints on size and memory usage. This way, the CircularDict will be always up-to-date with the last N added elements, ensuring that neither the maximum length nor the memory usage limit is exceeded. It is ideal for caching large data structures while maintaining control over memory footprint.
Project description
CircularQueueDict
Dictionary that acts as a Circular Queue, allowing to set a maximum length and automatically delete oldest element when inputting a new one. Useful for temporal storage of large elements that could overflow memory.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.