Skip to main content

A NoSQL Database Implementation using Amazon S3

Project description

S3NoSQLDB

A NoSQL Database Implementation using Amazon S3 for storage.

Features

  • Create and manage collections in S3 buckets
  • Batch document insertion with automatic ID generation
  • Concurrent processing using ThreadPoolExecutor
  • Query documents using custom filter functions
  • Parquet file format with gzip compression

Installation

pip install s3nosqldb

Quick Start

from s3nosqldb import S3NoSQLDB

# Initialize the database
db = S3NoSQLDB(
    bucket_name="your-bucket-name",
    base_path="optional/path",
    batch_size=50000,
    max_workers=4
)

# Create a collection
db.create_collection("users", id_field="user_id", auto_generate_id=True)

# Insert documents
users = [
    {"name": "John Doe", "age": 30},
    {"name": "Jane Smith", "age": 25}
]
db.insert_batch("users", users)

# Query documents
def age_filter(doc):
    return doc["age"] > 25

results = db.query("users", filter_fn=age_filter)

Development

  1. Clone the repository:
git clone https://github.com/wqxxzd/s3nosqldb.git
cd s3nosqldb
  1. Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e .[dev]
  1. Run tests:
pytest

License

This project is licensed under the MIT License.

Badges

codecov

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

s3nosqldb-0.1.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

s3nosqldb-0.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file s3nosqldb-0.1.1.tar.gz.

File metadata

  • Download URL: s3nosqldb-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for s3nosqldb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2ef322e5f4eb60ba6b304a87974032285f478f168a932542955d9b232ae348cf
MD5 a758dba631a41f4f699da3142d6c9d3f
BLAKE2b-256 ecc1ca3f159ac321fa429e517e1dc0398648fae1b59b96ec6187af81c2166be5

See more details on using hashes here.

File details

Details for the file s3nosqldb-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: s3nosqldb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for s3nosqldb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d089dd61bcc17694d9efcf7243827204574efb5c2f823ee7e4457a73e609c909
MD5 746008f78badbf8ddf70e589594cf653
BLAKE2b-256 67b131c4bd7630471ccc8e55548dbb6875ff4f50727317b546c22f5ee81b163a

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