Skip to main content

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.

Metadata

Release files for ToyBase 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ToyBase 1.0.3
File Size Uploaded
ToyBase-1.0.3.tar.gz 3.6 kB Details

Release files / ToyBase-1.0.3.tar.gz

Download URL ToyBase-1.0.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
85716b6ab853256558a6baf559e649db9cb85e80ff195a671d5f41e10cd91218
BLAKE2b-256 checksum
How to use checksums
bd1107c2f18202d5b945ae0ffd160748f9fdcc62c1962f529a041ea3f322efbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

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