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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file txtdb-1.0.1.tar.gz
.
File metadata
- Download URL: txtdb-1.0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
1d779ed40061b4f78d87a2eb40415db6d8a72d9d586a49bfda500a8c268d236b
|
|
MD5 |
0cb85a6c058f7bdaadec3b473014ed1e
|
|
BLAKE2b-256 |
828dab79d1a8ce2104c0fe46187fa2cd5fe987105576edc0ea49209eb5d55729
|
File details
Details for the file txtdb-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: txtdb-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9d8cd320c25b0561ae97c5cacce7f25dae732f4ef0ae826bd7888146bf276453
|
|
MD5 |
c7c8af90f6834ec68f9376eb8f3fb65f
|
|
BLAKE2b-256 |
1b7f57f3451655fbe406a9db2d127e1e41e6a133c7e93828e97af00cdde38f53
|