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("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.2.tar.gz (3.6 kB view hashes)

Uploaded Source

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