Skip to main content

A Toy Database System written in Python

Project description

ToyBase 🚂

Status GitHub Issues GitHub Pull Requests Downloads License

A Toy Database System written in Python

📝 Table of Contents

🧐 About

This is a simple Toy Database System written in Python. It's not meant to be used in production but you can use it in a small apps if ou want. This is meant as a learning tool for people who want to learn how databases work. it's fairly simple to learn and use.

🏁 Getting Started

First off, Installing

just use pip.

$ pip install ToyBase

And that's it basically...

🎈 Usage

Creating a new table.

from ToyBase import ToyBase

base = ToyBase.ToyBase("test")

base.create_table(["Name", "Phone"])

This will create a new file called "test.tb" in the current directory.

Adding records/rows to the table.

base.add_record(["John Doe", "123456789"])

This will add a new record to the table.

Getting all records/rows from the table.

base.show_records()

This will return a list of all the records in the table.

Getting a specific record/row from the table.

base.get_record(0)

This will return the first record in the table.

Deleting a record/row from the table.

base.delete_record(0)

This will delete the first record in the table.

⛏️ Built Using

  • Python - Programming Language
  • Pickle - Python Object Serialization

✍️ Authors

  • @Sas2k - Idea & Initial work

See also the list of contributors who participated in this project.

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

ToyBase-1.0.3.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file ToyBase-1.0.3.tar.gz.

File metadata

  • Download URL: ToyBase-1.0.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for ToyBase-1.0.3.tar.gz
Algorithm Hash digest
SHA256 85716b6ab853256558a6baf559e649db9cb85e80ff195a671d5f41e10cd91218
MD5 0273878c6f97d0bd4405e1bbac9cd073
BLAKE2b-256 bd1107c2f18202d5b945ae0ffd160748f9fdcc62c1962f529a041ea3f322efbc

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