Skip to main content

ripikutils

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

PyPI version License: MIT

Table of Contents

Creation of Secret Manager

Every secret manager added should follow these guidelines:

  • Format: ripikutils/{clientName}/{useCase}
  • Data added inside the secret should at least include the following values:
    • mongoURI
    • dbName
    • useCase
    • s3Bucket

Installation

You can install ripikutils using pip:

pip install ripikutils

Features

  • MongoDB data filtering, insertion, updating, and deletion
  • AWS S3 operations (upload, download, delete, list)
  • Temporary directory management for image processing

Usage

MongoDB Operations

Initialize Mongo Client

Initialize MongoDB client using client name and its usecase

from ripikutils import initialize_mongo

mongo_client = initialize_mongo(client_name, usecase)

Apply Filter

Apply basic filter to your MongoDB query

filtered_data = mongo_client.apply_filter(collection, filter_params)

Insert Document

Insert documents to your MongoDB collection

mongo_client.insert(collection, document)

Update Document

Update a document in your MongoDB collection

mongo_client.update(collection, filter_params, update_params)

Delete Document

Delete a document from your MongoDB collection

mongo_client.delete(collection, filter_params)

AWS S3 Operations

Initialize AWS s3 Client

Initialize S3 Client using client name and usecase

from ripikutils import initialize_s3

s3_client = initialize_s3(client_name, usecase)

Upload Object/File

Upload a file to S3 using previously created s3_client

s3_client.upload_s3_object(file_path, object_name)

Download Object/File

Download a file from S3 using previously created s3_client

s3_client.download_s3_object(object_name, local_file_path)

Delete Object/File

Delete a file from S3 using previously created s3_client

s3_client.delete_s3_object(bucket_name, object_name)

Get Presigned URL

Get a presigned URL for a file in S3 using previously created s3_client

presigned_url = s3_client.get_presigned_url(object_name)

List Objects in S3 Bucket

List objects in a S3 bucket using previously created s3_client

objects = s3_client.list_s3_objects()

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.

Metadata

Release files for ripikutils 0.10.2

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

Source distribution (sdist)

Source distribution for ripikutils 0.10.2
File Size Uploaded
ripikutils-0.10.2.tar.gz 17.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ripikutils 0.10.2
File Interpreter ABI Platform
ripikutils-0.10.2-py3-none-any.whl Python 3 none any Details

Total release size: 38.5 kB

Release files / ripikutils-0.10.2.tar.gz

Download URL ripikutils-0.10.2.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d1b0ba5b482463b5896f0907e95cfb08bb186f482cfb2bcfca857af4e5082904
BLAKE2b-256 checksum
How to use checksums
161682e47f9e76c76970147953edcfaae62314d2cd3bc5a78374391210408080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / ripikutils-0.10.2-py3-none-any.whl

Download URL ripikutils-0.10.2-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65f703b022119cf9f45f6d9597260e2b6aa05039c7804928d4673f23a8b8d772
BLAKE2b-256 checksum
How to use checksums
a75feccc2d714134cb29cf9e5208e70689ce63307e86ceaa75e3d0e958cdbc6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.10.2 This release

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

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