semvec/pypi-packages huggingface dataset:
approval 0.11
Easily moderate any content before it's visible to the public.
Requires Python: >=3.9

# Moderation application for Django

`django-approval` is a tool to facilitate moderation of changes made to any model instance. 

This application supports Django 3.2 and above, and Python 3.10 and above.

<img src="./approval-icon.svg" height="64" alt="Approval logo"/>

This application lets you define a moderation pipeline on almost any model, that generally works as follows:

1. One user on your site makes a change on specific fields of some content
2. The user validates that his/her changes are suitable to get moderated (from draft)
3. While the changes are not checked by a moderator, nothing *new* will be visible on the front website
4. When the moderator accepts the changes, they are applied to the live data visible by the users.


## How to install

`django-approval` is best installed using `pip`:

```bash
pip install django-approval
```

## Documentation

See the [online documentation here](https://artscoop.github.io/django-approval/approval.html)
persisty-data 0.0.3
A binary data persistence layer built on top of persisty

# Persisty Data

This is an addition to the [persisty](https://github.com/tofarr/persisty) framework for handling binary data 
(File Uploads). The objective is to be compatible with third party services, including ones that use signed
URLs for posting / reading (Such as S3).

## Concepts

* [DataItems](persisty_data/data_item_abc.py) represent the storage of binary data, with methods for reading and writing
  as well as obtaining meta such as file size, last modified and etag
* [DataStores](persisty_data/data_store_abc.py) store data items, with higher level methods for copying efficiently
* [DataStoreFactories](persisty_data/data_store_factory_abc.py) handle authorization when creating create data stores,
  as well as providing methods for generating presigned urls meaning that the server may be bypassed completely in some
  implementations (such as S3)

## Implementations

### Chunk

The chunk implementation breaks up an item into [chunks](persisty_data/chunk.py) smaller than preset size and storing
these using regular persisty.

### Directory

The [Directory Store](persisty_data/directory_data_store.py) stores data items as files within a directory on a hosted
file system.

### S3

The [S3 Store](persisty_data/s3_data_store.py) stores data items as entries in an S3 bucket. It is unique in the stock
implementations in that it also provides an [S3 Data Store Factory](persisty_data/s3_data_store_factory.py) rather
than relying on the [Hosted Data Store Factory](persisty_data/hosted_data_store_factory.py) used by other
implementations for providing pre-signed read urls and [Upload Forms](persisty_data/upload_form.py).

* Reading Data
* Writing data
* Strategy for bypassing server using Signed URLs
* Example

## Example

[A variant of the persisty messenger example application demonstrates file upload.](examples/messenger)

## Installing local development dependencies

```
python setup.py install easy_install "persisty-data[dev]"
```

## Release Procedure

![status](https://github.com/tofarr/persisty-data/actions/workflows/quality.yml/badge.svg?branch=main)

The typical process here is:
* Create a PR with changes. Merge these to main (The `Quality` workflows make sure that your PR
  meets the styling, linting, and code coverage standards).
* New releases created in github are automatically uploaded to pypi
st-wordcloud 0.0.7
st_wordcloud React component for Streamlit
Requires Python: >=3.7

# Streamlit - WordCloud React

A Streamlit simple component to display [WordCloud](https://www.npmjs.com/package/react-d3-cloud).

![](./img/demo.png)

## Install

```shell script
pip install st-wordcloud
```

## Usage

```python
from st_wordcloud import st_wordcloud

words = [{"text": "Python", "value": 500, "topic": "lol"}, {"text": "Streamlit", "value": 80},{"text": "Streamlit", "value": 80},{"text": "Streamlit", "value": 80},{"text": "Streamlit", "value": 80},{"text": "Streamlit", "value": 80},{"text": "Streamlit", "value": 80}]

st_wordcloud(words, width=800, height=600)
greenletio 0.11.0
Asyncio integration with sync code using greenlets.
Requires Python: >=3.7

# greenletio

[![Build status](https://github.com/miguelgrinberg/greenletio/workflows/build/badge.svg)](https://github.com/miguelgrinberg/greenletio/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/greenletio/branch/main/graph/badge.svg)](https://codecov.io/gh/miguelgrinberg/greenletio)

This project allows synchronous and asynchronous functions to be used together.
Unlike other methods based on executors and thread or process pools,
`greenletio` allows synchronous functions to work like their asynchronous
counterparts, without the need to create expensive threads or processes.

## Examples

The following are some of the possibilities when using `greenletio`.

### Convert a sync function into an awaitable

```python
import asyncio
from greenletio import async_

@async_
def sync_function(arg):
    pass

async def async_function():
    await sync_function(42)

asyncio.run(async_function())
```

### Use await inside a sync function

```python
from greenletio import await_

async def async_function():
    pass

def sync_function():
    await_(async_function())
```

### Call an async function as a normal function

```python
from greenletio import await_

@await_
async def async_function():
    pass

def sync_function():
    async_function()
```

## Resources

- [Documentation](http://greenletio.readthedocs.io/en/latest/)
- [PyPI](https://pypi.python.org/pypi/greenletio)
- [Change Log](https://github.com/miguelgrinberg/greenletio/blob/main/CHANGES.md)
jwtberry 0.2.0
Jwt authentication for Django Strawberry GraphQl

# jwtberry

<div align="center">
<img alt="jwtberry Logo" height="300" src="https://raw.githubusercontent.com/VachaganGrigoryan/jwtberry/master/jwtberry_logo.png" width="300"/>
</div>

**jwtberry** is a Python package that simplifies JWT (JSON Web Token) authentication for Django Strawberry GraphQL projects. It provides easy-to-use tools for implementing JWT authentication within your Strawberry-based GraphQL API.

## Features

- Seamless integration with Django Strawberry GraphQL.
- Simplified JWT authentication setup for your API.
- Customizable token generation and validation.

## Installation

You can install **jwtberry** using `pip`:

```bash
pip install jwtberry
```

## Usage
1. Add 'jwtberry.blackberry' app to your Django INSTALLED_APPS in the settings.py file:
```python
INSTALLED_APPS = [
    # ...
    'jwtberry.blackberry',
]
```

2. Configure your Django project's AUTHENTICATION_BACKENDS in settings.py to include the JwtAuthBackend from jwtberry:
```python
AUTHENTICATION_BACKENDS = [
    "jwtberry.backends.JwtAuthBackend",
    "django.contrib.auth.backends.ModelBackend",
]
```

3. Update your project's urls.py by importing JwtAsyncGraphQLView from jwtberry.views and adding a path for the GraphQL endpoint:

```python
from jwtberry.views import JwtAsyncGraphQLView

urlpatterns = [
    # ...
    path("graphql/", JwtAsyncGraphQLView.as_view(schema=schema)),
]
```

4. In your schema.py (where you define your GraphQL schema), make the following changes to include JWT-based authentication:

```python
import strawberry
from jwtberry.mutations import auth_token
from jwtberry.permission import IsAuthenticated
from jwtberry.types import JwtAuthResponse

@strawberry.type
class Query:
    hi: str = strawberry.field(resolver=lambda: "Hello", permission_classes=[IsAuthenticated])

@strawberry.type
class Mutation:
    login: JwtAuthResponse = auth_token

schema = strawberry.Schema(
    query=Query,
    mutation=Mutation,
)
```
`IsAuthenticated` is a permission class that checks whether the user has authenticated by verifying the Authorization header.

For more detailed information and examples, check the [example](example) project.