semvec/pypi-packages huggingface dataset:
mongodb-client 0.2
A Python module to interact with a MongoDB database via HTTP requests.
Requires Python: >=3.6

# MongoDB Client

A Python module to interact with a MongoDB database via HTTP requests.

## Features

- **Sign In**: Authenticate using email and password to receive an access token.
- **CRUD Operations**: Create, Read, Update, and Delete records in the MongoDB database.
- **Flexible Authentication**: Use the access token for authentication in subsequent requests.

## Installation

You can install this module directly from the GitHub repository:

```bash
pip install git+https://github.com/yourusername/mongodb_client.git
```

## Usage

### 1. Import and Initialize the Client

First, import the `MongoDB` class from the module and initialize it with the base URL of your MongoDB HTTP server:

```python
from mongodb_client.mongodb import MongoDB

client = MongoDB(base_url="http://localhost:8080")
```

### 2. Sign In

Sign in with your email and password to receive an access token:

```python
success = client.signin("email@example.com", "password")
if success:
    print("Signed in successfully!")
else:
    print("Failed to sign in.")
```

### 3. Perform CRUD Operations

#### Get Records

Retrieve records from a specific database and collection:

```python
records = client.get_records("mydatabase", "mycollection")
print(records)
```

#### Get Record by ID

Retrieve a specific record by its ID:

```python
record = client.get_record_by_id("mydatabase", "mycollection", "record_id")
print(record)
```

#### Create Records

Create new records in a specific database and collection:

```python
new_record = {"name": "John Doe", "email": "john@example.com"}
response = client.create_records("mydatabase", "mycollection", new_record)
print(response)
```

#### Update Record

Update an existing record by its ID:

```python
updated_data = {"name": "Jane Doe"}
response = client.update_record("mydatabase", "mycollection", "record_id", updated_data)
print(response)
```

#### Delete Record

Delete a specific record by its ID:

```python
response = client.delete_record("mydatabase", "mycollection", "record_id")
print(response)
```

#### Delete Records

Delete all records in a specific database and collection:

```python
response = client.delete_records("mydatabase", "mycollection")
print(response)
```

## Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
huggingfs 0.5
huggingface downloader web ui
Requires Python: >=3.6

# HuggingFS

A Web UI for downloading Huggingface repositories.

# Install

```
git clone https://github.com/cocktailpeanut/huggingfs
cd huggingfs
pip install -r requirements.txt
```

# Usage

## 1. Minimal

Let's say you want to set the root path of the file system as `./models`.

Create a file named `hfs.json`:

```json
{
  "fs": [{
    "path": "models",
  }]
}
```

Then start the UI:

```
huggingfs hfs.json
```

## 2. Curated Options

The minimal version only lets you download by entering the HuggingFace ID (example: `KwaiVGI/LivePortrait`).

But often you will want to provide a pre-set options, from which the end users can select from. In this case, you can specify the `options` array:

```json
{
  "fs": [{
    "path": "models",
    "options": [
      "nvidia/Minitron-4B-Base",
      "coqui/XTTS-v2",
      "KwaiVGI/LivePortrait",
      "BAAI/bge-m3",
      "vidore/colpali"
    ]
  }]
}
```

Now start huggingfs

```
huggingfs hfs.json
```

## 3. Multiple Folders

Often you may want to store files to multiple folders.

For example, you may want to allow:

1. downloading model checkpoints to `stable-diffusion-webui/models/Stable-diffusion`
2. downloading Loras to `stable-diffusion-webui/models/Lora`

In this case you can simply extend the `fs` array like this:

This will create a dropdown


```json
{
  "fs": [{
    "path": "stable-diffusion-webui/models/Stable-diffusion",
    "options": [
      "stabilityai/stable-diffusion-3-medium",
      "xinsir/controlnet-union-sdxl-1.0",
      "fal/AuraFlow"
    ]
  }, {
    "path": "stable-diffusion-webui/models/Lora",
    "options": [
      "2vXpSwA7/iroiro-lora",
      "Cseti/Basic_camera_motion_LoRAs_sd15-ad2-v1"
    ]
  }]
}
```

And simply restart the app with:

```
huggingfs hfs.json
```