Skip to content
ItsTato edited this page Apr 4, 2024 · 7 revisions

Need further help?

Feel free to join us in our community server!

So what is this "grapes" thing anyways?

Grapes is a poorly-written, self-proclaimed "database" made entirely using only Python 3.10 out of all things.

Grapes comes with many types of databases:

  • The GrapesDatabase (otherwise known as Vanilla) is a simple database that stores all of it's information in a data directory. It keeps a consistent definition.bin file that keeps track of every tables' columns, etc. Each table is a table.grape file and information is fetched or written directly from these files as needed. Every set of data is a tuple.

  • Next, the InMemoryGrapesDatabase (also referred to as Chrome) inherits from the GrapesDatabase class but makes a few key changes:

    1. All data is stored in ram instead of accessing the files it needs every request.
    2. Data is written periodically (as defined by the write_rate property in it's __init__() function).
    3. Only modified data is written (the definition file is also updated a lot more frequently)
    4. Outsider modifications to the table files without use of the class or from another instance running on the same directory will not be considered when performing a get request on the data.

This class does not fail to be quite memory hungry, especially the bigger the dataset you are working with is, hence the nickname Chrome. This class will also be much faster in performing its write and get requests however faces potential data loss if not properly used and especially in case of sudden shut-downs could loose all of the data written to it in the last 120.0s (depends on the write rate you set). When executing programs that will exit before your set write rate can execute, a write_all_data() method has been provided.

The Grapes Database Wiki

Grapes is powered by its community!

Feel free to join our Discord server!


Clone this wiki locally