Skip to main content

A utility package for AWS S3 and MongoDB operations

Project description

ripikutils

ripikutils is a Python package providing utility functions for MongoDB operations and AWS S3 interactions, specifically designed for internal use at Ripik Tech.

PyPI version License: MIT

Creation of Secret Manager

Every secret manager added should follow these guidelines:

  • ripikutils/{clientName}/{useCase}
  • Data added inside the secret should atleast have these values
    • mongoURI
    • dbName
    • useCase
    • s3Bucket

Installation

You can install ripikutils using pip:

pip install ripikutils

Features

  • MongoDB data filtering, inserting, updation, and deletion
  • AWS S3 operations (upload, download)
  • Temporary directory management for image processing

Usage

MongoDB Operations

Initialize Mongo Client

from ripikutils.mongo import initialize_mongo

# Initialize a MongoDB client
mongo_client = initialize_mongo(client_name)

Apply Filter

from ripikutils.mongo import apply_basic_filter

# Apply basic filter to your MongoDB query
filtered_data = apply_filter(collection, filter_params)

Insert Document

from ripikutils.mongo import insert

# Insert a document into your MongoDB collection
insert(collection, document)

Update Document

from ripikutils.mongo import update

# Update a document in your MongoDB collection
update(collection, filter_params, update_params)

Delete Document

from ripikutils.mongo import delete

# Delete a document from your MongoDB collection
delete(collection, filter_params)

AWS S3 Operations

Upload Object/File

from ripikutils.aws import upload_s3_object

# Upload a file to S3
upload_s3_object(file_path, bucket_name, object_name)

Download Object/File

from ripikutils.aws import download_s3_object

# Download a file from S3
download_s3_object(bucket_name, object_name, local_file_path)

Delete Object/File

from ripikutils.aws import delete_s3_object

# Delete a file from S3
delete_s3_object(bucket_name, object_name)

Get Presigned URL

from ripikutils.aws import get_presigned_url

# Get a presigned URL for a file in S3
presigned_url = get_presigned_url(bucket_name, object_name)

List Objects in S3 Bucket

from ripikutils.aws import list_s3_objects

# List objects in a S3 bucket
objects = list_s3_objects(bucket_name)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For any queries or support, please contact the Ripik Tech team at vaibhav@ripik.ai.

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

ripikutils-0.3.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

ripikutils-0.3.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file ripikutils-0.3.0.tar.gz.

File metadata

  • Download URL: ripikutils-0.3.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for ripikutils-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6b5bc8968e46ac1cfde005d5038e28a6eea067066204a066d69050eb6ba3fd5e
MD5 5d69ab8612c4900b9856d5398aea1d7c
BLAKE2b-256 4b23834eee3287eb7b61e3a4fb851ef846b8373d70596fc0373449a8780424ab

See more details on using hashes here.

File details

Details for the file ripikutils-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ripikutils-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for ripikutils-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ee10e682bd9e0070e1666216006769c37179d6f1bfc6592bd01b06171a8f35e
MD5 5fdb4e5bba6ece9249816c3d1c8ad1e4
BLAKE2b-256 44861763dc35acf1c19f8cede99174f5f535edf530dce101094f59bd83cf8871

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