Skip to main content

This library is an easyest way to use local database!

Project description

PortableDB Documentation

PortableDB is a lightweight, easy-to-use Python package for creating, managing, and interacting with portable databases.

Installation

To install PortableDB, use pip:

pip install portableDB

Methods

DATABASE(name)

Defines the database to work with. You must initialize a DATABASE object before using other methods.

  • Arguments:
    • name (str): The name of the database file (e.g., 'Database.db').
      • This file will be created if it doesn't already exist.

LogType(Type)

Sets the logging state for database operations.

  • Arguments:
    • Type (str): Can be one of the following:
      • 'COLORFUL': Enables colorful logs for better readability.
      • 'BASE': Enables normal command-line logging.
      • 'NONE': Disables logging output.

CreateDatabase()

Creates a new database.

  • Arguments:
    • No arguments are required.

WriteDatabase(information, cell)

Writes data to the database.

  • Arguments:
    • information (array): An array of values to write (e.g., ['String value', 32]).
    • cell (str): The cell where the data will be written (e.g., 'LOL').
      • Cell can be of any type or value.

WriteIndex(information, cell, index)

Writes data to a specific index within a specified cell.

  • Arguments:
    • information (any type): The information to write (e.g., 'PON').
    • cell (str): The cell in which to write the information (e.g., 'LOL').
      • Cell can be of any type or value.
    • index (int): The index at which to write the information (e.g., 0).

ReadDatabase(cell, index)

Reads data from the database.

  • Arguments:

    • cell (str): The cell to read from (e.g., 'LOL').
    • index (str or int, optional):
      • 'ALL': Reads all elements in the specified cell.
      • An integer: Reads the specific element at the given index in the array.
      • If this argument is ignored, it behaves like 'ALL' was given.
  • Returns:

    • The data read from the specified cell and index.

RenameDatabase(newName)

Renames the database.

  • Arguments:
    • newName (str): The new name for the database (do not include the file type like '.db').

DeleteDatabase()

Deletes the specified database.

  • Arguments:
    • No arguments are required.

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

portabledb-1.9.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

portableDB-1.9-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file portabledb-1.9.tar.gz.

File metadata

  • Download URL: portabledb-1.9.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for portabledb-1.9.tar.gz
Algorithm Hash digest
SHA256 33e7100e9fb345034821340f1c3d764e4e449968174f76b447a1566567c362f3
MD5 74326f51655b686e2f5cbf6599a666a9
BLAKE2b-256 8bc4e4aa01bd86f1ae03280a2662f5a4001aee91c59d9eb48629c19436af036d

See more details on using hashes here.

File details

Details for the file portableDB-1.9-py3-none-any.whl.

File metadata

  • Download URL: portableDB-1.9-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for portableDB-1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f7858c183c364a2612aa5362fdf187b41ae49ea33431ac26aba86a02bc83e704
MD5 a3efd35d7daa2112c69ff08a04023419
BLAKE2b-256 0bc3461447c52ce649729514580661357d9de5135775ddcf6cd34b60a18eba1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page