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
- Clone the repository:
git clone https://github.com/wqxxzd/s3nosqldb.git
cd s3nosqldb
- Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .[dev]
- Run tests:
pytest
License
This project is licensed under the MIT License.
Badges
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ef322e5f4eb60ba6b304a87974032285f478f168a932542955d9b232ae348cf
|
|
| MD5 |
a758dba631a41f4f699da3142d6c9d3f
|
|
| BLAKE2b-256 |
ecc1ca3f159ac321fa429e517e1dc0398648fae1b59b96ec6187af81c2166be5
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d089dd61bcc17694d9efcf7243827204574efb5c2f823ee7e4457a73e609c909
|
|
| MD5 |
746008f78badbf8ddf70e589594cf653
|
|
| BLAKE2b-256 |
67b131c4bd7630471ccc8e55548dbb6875ff4f50727317b546c22f5ee81b163a
|