semvec/pypi-packages huggingface dataset:
python-himpunan 0.1.1
Library Himpunan sederhana menggunakan Python
Requires Python: >=3.6

# Python Himpunan

Python Himpunan adalah library sederhana yang mengimplementasikan berbagai operasi himpunan menggunakan list sebagai struktur data dasar. Library ini memungkinkan pengguna melakukan operasi seperti gabungan, irisan, selisih, selisih simetris, dan lainnya.

## Cara Instalasi

Anda dapat menginstal library ini menggunakan pip:

pip install python-himpunan
mongoapi 1.0.2
A Python package for simplifying MongoDB operations with built-in support for TTL and CRUD functionality.
Requires Python: >=3.6
Keywords: Python, MongoDB, API, Database Management, TTL, CRUD Operations, pymongo


# MongoAPI

**MongoAPI** is a Python package designed to simplify MongoDB operations. This tool provides an intuitive interface for interacting with MongoDB collections, including features like CRUD operations, TTL (Time-To-Live) indexing, and automatic expiration handling.

<br>

## Installation

To install MongoAPI, use pip:

```bash
pip install mongoapi
```

or install directly from the GitHub repository:

```bash
pip install git+https://github.com/rekcah-pavi/mongoapi
```

---

## Features

- **CRUD Operations:** Easily perform Create, Read, Update, and Delete actions on MongoDB documents.
- **Expiration Handling:** Automatically manage document expiration with the `__expires` field.
- **Indexing:** Supports unique key indexing and TTL indexing for automatic cleanup of expired documents.
- **Lightweight Dependency:** Built with `pymongo` for efficient database interaction.

---

## Usage

### Initialize the API

```python
from mongoapi import mongoapi,mongodb_url

url = mongodb_url("username","pass","dbname","host") #port=27017
# Initialize the MongoAPI
api = mongoapi(url,"mydb")

```

### Insert or Update a Document

```python
# Insert or update a document
import time
ex = time.time()+60 #expires in 60 seconds
api.put({"key": "item1", "value": "data", "__expires": ex})  # __expires is an optional expiry timestamp

#insert many at once
api.put([{"key": https://pypi.org/project/mongoapi/
### Retrieve a Document

```python
# Retrieve  by key
item = api.get("item1")
print(item)
```

### Update Specific Fields

```python
# Update specific fields by key
api.patch("item1", {"value": "updated_data"})
```

### Delete a Document

```python
# Delete a document by key
api.delete("item1")
```

### Retrieve All Documents

```python
# Retrieve all non-expired documents
all_items = api.get_all()
print(all_items)
```

### Delete All Documents

```python
# Delete all documents in the collection
api.delete_all()
```

---

## License

This package is licensed under the MIT License. See the LICENSE file for details.

---

## Author

Developed by Paviththanan (rkpavi06@gmail.com).  
GitHub Repository: [MongoAPI](https://github.com/rekcah-pavi/mongoapi)
retry-toolkit 0.6.1
Yet another retry implementation.
Requires Python: >=3.8

# retry_toolkit

[![PyPI - Version](https://img.shields.io/pypi/v/retry-toolkit.svg)](https://pypi.org/project/retry-toolkit)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/retry-toolkit.svg)](https://pypi.org/project/retry-toolkit)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
![PyPI Downloads](https://static.pepy.tech/badge/retry-toolkit)
-----

(Yet Another) Retry implementation for python.

Do you have code that may be subjected to intermittent failures? Then you should
have a retry wapper for it. This module includes a simple retry decorator
(factory) you can use. Or peek inside and copy the implementation into your own
project where you can make your own tweaks.

*No dependencies outside of standard python libraries*


## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Examples](#examples)
- [License](#license)

## Features

- wraps a function with the following behaviors..
- configurable number of retries un case of Exception
- configurable backoff before retrying
- configurable which exceptions trigger a retry
- raises specialized 'GiveUp' exception when retries exhausted
- all configuration items accept a callable for maximum flexibility
- all configuration is processed live on each execution for compatibility
  with live adjustments, experiments, feature-flag selectable changes
- includes an async variant with all the same features

## Installation

```console
pip install retry-toolkit
```

## Examples

Defaults to 3 tries, no delays between, retry all exceptions:

```python
from retry.simple import retry

@retry()
def foo():
    some_networking_stuff()
```

Customize the basic behaviors like so:

```python
from retry.simple import retry

@retry(tries=4, backoff=1, exceptions=SomeConnectionError)
def foo():
    some_other_networking_stuff()
```
The arguments can take callables for more customization.

## License

`retry-toolkit` is distributed under the terms of the
[MIT](https://spdx.org/licenses/MIT.html) license.