Skip to main content

A simple NoSQL database that uses .txt files.

Project description

txtdb

A simple NoSQL database that uses .txt files.

Usage

First, import txtdb and create a database:

import txtdb
name_of_db = txtdb.init("name_of_db")

add

Adds elements do the database.

name_of_db.add("element", "element2", ..., "elementn")

remove_all

Removes all the elements from the database.

name_of_db.remove_all()

remove_by_element

Removes elements from the database by their value.

name_of_db.remove_by_element("element", "element2", ..., "elementn")

remove_by_string

Removes elements from the database where a string is in.

name_of_db.remove_by_string("string", "string2", ..., "stringn")

remove_by_index

Removes elements from the database by their indexes.

name_of_db.remove_by_index(index1, index2, ..., indexn)

get_all

Returns all the elements in the database.

name_of_db.get_all()

get_by_string

Returns all the elements in the database where a string is in.

name_of_db.get_by_string(index1, index2, ..., indexn)

get_by_index

Returns all the elements by their indexes.

name_of_db.get_by_index(index1, index2, ..., indexn)

count

Returns the number of elements that a txtdb function has returned.

name_of_db.count("txtdb_output")

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

txtdb-1.0.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

txtdb-1.0.1-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

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