Skip to main content

A simple, efficient, and encrypted Python database library for secure data storage

Project description

PyDB - Encrypted Python Database

English

Introduction

PyDB is a simple, efficient, and encrypted Python database library for storing data ranging from small to massive scale. This is an open-source database solution that uses JSON-based storage with encryption to keep your data secure.

Key Features

  • Encrypted Storage: All data is encrypted using password-based encryption
  • Simple API: Easy-to-use interface for database operations
  • Type Safety: Column definitions with data type validation
  • CRUD Operations: Full support for Create, Read, Update, and Delete operations
  • Lightweight: No external database server required
  • Python Native: Pure Python implementation

Basic Usage

from pydb import (
    # Configurate
    Database, Column,
    
    # Type
    String, Number, Integer, Float, Boolean
)
# Create a new encrypted database
db = Database.create_new(
    "my_database.pydb", # file.pydb
    "my_password", # a password
)

# Define table columns
columns = {
    'id': Column('id', Integer, nullable=False),
    'name': Column('name', String, max_length=100),
    'email': Column('email', String)
}

# Create table and insert data
table = db.create_table("users", columns)
table.insert_data(id=1, name="John", email="john@example.com")

# Save database
db.save()

Author

Elang Muhammad R. J. (Elang-elang)

License

This project is licensed under the MIT License. If you modify or improve this code, please contact the author or include attribution and update the repository.

Note

This database is based on encrypted JSON storage. While you can create similar databases from scratch or modify this script, databases created using similar concepts are considered derivative works and should maintain proper attribution.


Bahasa Indonesia

Perkenalan

PyDB adalah library database Python yang sederhana, efisien, dan terenkripsi untuk menyimpan data dari skala kecil hingga masif. Ini adalah solusi database open-source yang menggunakan penyimpanan berbasis JSON dengan enkripsi untuk menjaga keamanan data Anda.

Fitur Utama

  • Penyimpanan Terenkripsi: Semua data dienkripsi menggunakan enkripsi berbasis kata sandi
  • API Sederhana: Interface yang mudah digunakan untuk operasi database
  • Keamanan Tipe Data: Definisi kolom dengan validasi tipe data
  • Operasi CRUD: Dukungan penuh untuk operasi Create, Read, Update, dan Delete
  • Ringan: Tidak memerlukan server database eksternal
  • Native Python: Implementasi murni Python

Penggunaan Dasar

from PyDB import (
    # Configurasi
    Database, Column,
    
    # Tipe
    String, Number, Integer, Float, Boolean
)
# Buat database terenkripsi baru
db = Database.create_new(
    "database_saya.pydb", # file.pydb
    "kata_sandi_saya" # kata sandi
)

# Definisikan kolom tabel
columns = {
    'id': Column('id', int, nullable=False),
    'nama': Column('nama', str, max_length=100),
    'email': Column('email', str)
}

# Buat tabel dan masukkan data
table = db.create_table("pengguna", columns)
table.insert_data(id=1, nama="John", email="john@example.com")

# Simpan database
db.save()

Pembuat

Elang Muhammad R. J. (Elang-elang)

Lisensi

Proyek ini dilisensikan di bawah MIT License. Jika Anda memodifikasi atau memperbaiki kode ini, harap hubungi pembuat atau sertakan atribusi dan perbarui repositori.

Catatan

Database ini didasarkan pada penyimpanan JSON terenkripsi. Meskipun Anda dapat membuat database serupa dari awal atau memodifikasi script ini, database yang dibuat menggunakan konsep serupa dianggap sebagai karya turunan dan harus mempertahankan atribusi yang tepat.


Installation

pip install PyDB-Encrypted

Requirements

  • Python 3.7+
  • cryptography

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contact

For questions or contributions, please contact Elang Muhammad R. J. (Elang-elang)

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

pydb_encrypted-1.1.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydb_encrypted-1.1.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file pydb_encrypted-1.1.0.tar.gz.

File metadata

  • Download URL: pydb_encrypted-1.1.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pydb_encrypted-1.1.0.tar.gz
Algorithm Hash digest
SHA256 10df3c1bf8504ed2d08b2bb5174170e19244cee06eb0111fa7fb627feb1c8544
MD5 3b0dff136c0f6411e4b887528532c977
BLAKE2b-256 b646cd37dc0bba86dd2563c64d79e69611cdfc51615dd633fead97f018baaa80

See more details on using hashes here.

File details

Details for the file pydb_encrypted-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pydb_encrypted-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pydb_encrypted-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97251b1010aac0e284fa33cd91f51353424d9e05f385b7076fec24075f96bd39
MD5 31f049dcd6701981b64172e7c6b342c3
BLAKE2b-256 d494c145fe3613c582e6b453cf89357c47617b5d3bad3d4ebfb1891e5f6c012e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page