semvec/pypi-packages huggingface dataset:
fastapi-async-s3uploader 0.1.1
A reusable file uploader package for FastAPI and AWS S3

# s3_uploader

A reusable, configurable file uploader package for FastAPI that supports uploading single and multiple files to AWS S3 with validations, dynamic folder structure, and file deletion.

---

## Features

- Upload single or multiple files in the same API
- File extension and size validation (configurable)
- Unique filename generation to avoid collisions
- Dynamic folder structure support
- Delete files from S3 by key
- Async and optimized for FastAPI with aioboto3
- Configuration via environment variables or `.env` file using Pydantic

---

## Installation

Install via pip:

```bash
pip install s3_uploader
```

Or install from source:

```bash
pip install -e ./s3_uploader
```

---

## Configuration

The package uses a `config.py` with Pydantic `BaseSettings` to load AWS and upload settings from environment variables or a `.env` file.

Create a `.env` file in your project root with the following variables:

```env
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=us-east-1
BUCKET_NAME=your_s3_bucket_name
ALLOWED_EXTENSIONS=jpg,png,pdf,docx
MAX_FILE_SIZE_MB=10
```

You can customize allowed file extensions and max file size as needed.

---

## Usage Example

### Upload single or multiple files in one API endpoint

```python
from fastapi import FastAPI, UploadFile, File, Form
from typing import List, Optional
from s3_uploader import upload_dynamic, delete_file_from_s3

app = FastAPI()

@app.post("/upload/")
async def upload_files(
    file: Optional[UploadFile] = File(None),
    files: Optional[List[UploadFile]] = File(None),
    folder: str = Form("uploads")
):
    urls = await upload_dynamic(file=file, files=files, folder=folder)
    return {"uploaded_urls": urls}
```

### Delete a file from S3 by key

```python
@app.delete("/delete/")
async def delete_file(key: str):
    await delete_file_from_s3(key)
    return {"message": f"File {key} deleted successfully"}
```

---

## Example `.env.example`

```env
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=us-east-1
BUCKET_NAME=your_s3_bucket_name
ALLOWED_EXTENSIONS=jpg,png,pdf,docx
MAX_FILE_SIZE_MB=10
```

Copy this file to `.env` and update the values.

---

## Requirements

- Python 3.8+
- FastAPI
- aioboto3
- pydantic

---

## License

MIT License

---

## Contributing

Feel free to open issues or submit pull requests to improve the package.
dash-customizable-app-style 0.0.7
Customizable background color, text color and font family for Dash applications using Dash Hooks
Requires Python: >=3.8

# Dash Customizable Style App Plugin Using Dash Hooks

Background color, text color and font family selectors to cusotmize your Dash apps using Dash Hooks.

## Usage

```python
from dash import html, Dash
import dash_bootstrap_components as dbc
import dash_ag_grid as dag  # Imported for the example explanation
import dash_customizable_app_style as style_plugin

# Initialize the Dash app
app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])

# Create the Dash App layout
app.layout = html.Div(

    # Set an ID called 'main_container' to the component you want an exchangeable background color, text color and font family
    id       = "main_container",
    children = [

        # Register the app style selectors
        style_plugin.customize_app_selectors(),

        # To be able to also update AgGrid's background color, text color
        # and font family, use a pattern-matching ID for them as following.
        dag.AgGrid(id       = {"type": "grid", "index": "your_grid_index"} 
                    # Rest of AgGrid...
                    ),

        # To be able to also update Figure's background color, text color
        # and font family, use a dcc.Store, dcc.Graph and a pattern-matching 
        # ID for them as following.
        dcc.Store(id={"type": "figure-store", "index": "line"}),
        dcc.Graph(id={"type": "graph", "index": "line"}),

        dcc.Store(id={"type": "figure-store", "index": "histogram"}),
        dcc.Graph(id={"type": "graph", "index": "histogram"})

        # Rest of your app code...
    ])

# To update Figures from an @app.callback
@app.callback(
    Output({"type": "figure-store", "index": "line"}, "data"),
    Output({"type": "figure-store", "index": "histogram"}, "data"),
    #    Rest of your callback....

    return line.to_dict(), histogram.to_dict()
```

## Install requirements

```bash
pip install dash
pip install dash-bootstrap-components
```
stackit-core 0.2.0
Core functionality for the STACKIT SDK for Python
Requires Python: <4.0,>=3.8

> ⓘ INFO: The STACKIT Python SDK is in beta and in active development.


# STACKIT Python SDK Core

## Introduction

The STACKIT Python core package consists of core functionality which is needed
to use the [STACKIT Python SDK](https://github.com/stackitcloud/stackit-sdk-python).

## Usage

The core package does nothing on its own and must be used in conjunction with the services of the [STACKIT Python SDK](https://github.com/stackitcloud/stackit-sdk-python).