Skip to main content

ASD DATABASE

A simple database for your projects.

Install

pip install asd-database

Usage

Here's a quick example to get you started:

from asd_database import ASDDatabase

# Create a new database
db = ASDDatabase('my_database')

# Create a table with columns 'id', 'name', and 'email'
db.create_table('users', ['id', 'name', 'email'])

# Insert data into the table
db.insertdata([1, 'Mario Rossi', 'mario@example.com'], 'users')
db.insertdata([2, 'Luca Bianchi', 'luca@example.com'], 'users')

# Read the second row (header is row 0)
print(db.read('users', 2))

File Structure

Each table is stored in a .asd file inside the database directory. The first row contains the column headers, and each subsequent row represents a data entry.

Example users.asd file:

id|name|email
1|Mario Rossi|mario@example.com
2|Luca Bianchi|luca@example.com

API Reference

ASDDatabase(db_name)

Creates or opens a database directory.

create_table(table_name, columns)

Creates a new table with the specified columns.

Parameters:

  • table_name (str): The name of the table.
  • columns (list): A list of column names.

insertdata(data, table_name)

Inserts a row of data into the specified table.

Parameters:

  • data (list): A list of values corresponding to the table columns.
  • table_name (str): The name of the table.

read(table_name, row)

Reads a specific row from the specified table.

Parameters:

  • table_name (str): The name of the table.
  • row (int): The row number to read (header is row 0).

Returns:

  • A list of values from the specified row.

License

This project is licensed under the MIT License.

Metadata

Release files for asd-database 1.0.0

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

Source distribution (sdist)

Source distribution for asd-database 1.0.0
File Size Uploaded
asd_database-1.0.0.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asd-database 1.0.0
File Interpreter ABI Platform
asd_database-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / asd_database-1.0.0.tar.gz

Download URL asd_database-1.0.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
041aca1d98bef36a935c336c45c2ffbe5f903a0ec2f27388e5b3954c5a03fb57
BLAKE2b-256 checksum
How to use checksums
f15478575b9eecc8f86d13fc6a413039290d2729952ea36a7e6f36263cee1f0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / asd_database-1.0.0-py3-none-any.whl

Download URL asd_database-1.0.0-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12af709482ce1853787308ae22f2c245c2cb6a054826effdeab0c9ed97358315
BLAKE2b-256 checksum
How to use checksums
42cc5478d15af7235fdcdf5bc1471aa38fea634d0c495333648781a8be8c4613
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release 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