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.setvariable(v, '{0}'.format(v)) # sets variable in the database
print(database.getvariable(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.setvariable("varname", "value")

Deleting variable

database.deletevariable("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")

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.1.1.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.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trolldb-1.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 144d8083185e13cfd791c504e949243528110ed30d6e5c2e3e68214d258751a9
MD5 c7442ec1d24f5e36919ed6cc4d3be2d9
BLAKE2b-256 23c2629095df38ac893bdb0b5a72caa2f804f25f0d10d49fdfaf206ea6e5c912

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trolldb-1.1.1-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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2102eab8abe3d26877c4728a7a3497b0df0f6db47bbff41fec95b9b1bd0838e8
MD5 c365c2962d65066940ce64837d7f20ba
BLAKE2b-256 b874a32411277a0090c8ff73987e277ee121f21e2eacf3af32f16fc5dd9312ad

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.1

2 files

1.2.0

2 files

This release

1.1.1 This release

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