Skip to main content

Python built NoSQL database

Project description

Index:

  1. Classes

    1. Record

    2. pyBase

  2. Functions

    1. create_database_from_schema
    2. create_new_database
    3. encrypt
    4. load_data
    5. save

pyBase

Classes

class Record()

Methods defined here:

  • addOrQuery(self, field: str, operator, condition) -> object

  • addQuery(self, field: str, operator, condition) -> object

    Filter data by field and by providing a value

  • delete(self) -> None

    DEPRECATED METHOD

  • get(self, id: str, p=False) -> pyBase

    Returns a single database entry

    1. @param id - Unique record ID

    2. @param p - Flag for formated print

    3. @returns pyBase Object

  • insert(self, json_data: dict) -> str

    Inserts [Record](#Record) in Database

    1. @param json_data - dict

  • mark_delete(self, data: dict) -> object

    DEPRECATED METHOD

  • query(self, p=False) -> None

    Returns the results of a database with/without filter options and stores in "result" variable

    1. @param p - Flag for formated print

    2. @returns None

  • setLimit(self, limit: int) -> None

    Set the number of Records returned

    1. @param limit - Number of records

  • sort_by(self, field: str, order: str) -> object

    Set the order of the list

    1. @param field - Field of a Database

    2. @param order - If order is Ascending or Descending


class pyBase

  • pyBase(record=None, database=None, index=None)

Methods defined here:

  • delete(self) -> None

    Permanently deletes Record from database

  • getCreationTime(self)

    Returns date of Record creation

  • update(self) -> None

    Permanently saves Record changes in Database

  • updateTime(self)

    Returns last update date


Static methods defined here:

  • getConfigPath()

    Returns pyBase local path

  • getDBInfo(db: str) -> None

    Get DB structure

  • getDatabases() -> list

    Get databases in local system


Functions

  • create_database_from_schema(verbose=False)

  • create_new_database(name, verbose=True)

    Method to create new database

  • encrypt(*args, **kwargs)

    Method to encrypt data

  • load_data(db)

    Loads data from a DB

    1. @param db - Name of Database
    2. @returns JSON dict

  • save(data, where)

    Save json data

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

pyBaseDB-0.2.1.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file pyBaseDB-0.2.1.tar.gz.

File metadata

  • Download URL: pyBaseDB-0.2.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.6

File hashes

Hashes for pyBaseDB-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ec82a03c803f005d5e701f3cf6f750712ca6f7592de30dc0923d77fe859ec826
MD5 7ec15b4012f89e02d99dd4f1841d9c09
BLAKE2b-256 1ef8cad6053222f306860992ff288d669227a66eff60849338b13366a2ec90dc

See more details on using hashes here.

Supported by

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