Skip to main content

TrollDB

Just a simple json database project made by Walter.

Installing

You need cryptography to use trolldb.

pip install --upgrade trolldb

Example code

import trolldb


database = trolldb.Database(trolldb.key_by_filename('key.trolldb')) # new database
print('Doing database on {0}'.format(database.getfilename())) 

v = str(1)
database.add(v, '{0}'.format(v)) # sets variable in the database
print(database.get(v)) # get variable 
print(database.getplainjson()) # prints the whole json

Getting 'key'

Trolldb will write your key into file called "key.trolldb"

import trolldb
trolldb.genkey()

Creating new database (or load existing database)

import trolldb
database = trolldb.Database("yourkeyhere")

Creating or changing a variable's value

database.add("varname", "value")

Deleting variable

database.remove("varname")

Using tables

note: Tables aren't finished yet.

Creating a new table (or load an existing table)

import trolldb
database = trolldb.Database("yourkeyhere")
table = trolldb.Table.new(database, "tablename")

Adding an element into the table (or changing an existing element)

table.add("elemname", "value")

Getting element value

table.get("elemname")

Deleting element

table.remove("elemname")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trolldb-1.2.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

trolldb-1.2.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file trolldb-1.2.0.tar.gz.

File metadata

  • Download URL: trolldb-1.2.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for trolldb-1.2.0.tar.gz
Algorithm Hash digest
SHA256 23468080032a74799a6ffe169440b1d2e4e859575a7545cc6238d0f49598f3ca
MD5 2c19ddad2e6cd63a8e9f848573f8bcf6
BLAKE2b-256 3475b06064fa77c00ffbfc725a5ba135b83b993550cb31f264bfce6d3ebbbd3e

See more details on using hashes here.

File details

Details for the file trolldb-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: trolldb-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for trolldb-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3baadafda70a6da4af37ea1245fc86263423881a525559ad25558226b25bc437
MD5 3144ef0fd9773440333983857ed13dec
BLAKE2b-256 a1b5c2e28382e81da028f59cc74f0517a42c121f819f9b2f84acb85725b87ece

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.1

2 files

This release

1.2.0 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

1 file

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page